Как получить доступ к USB-накопителю из FreeDOS?
В связи с этим вопросом я пытаюсь перенести некоторые файлы на жесткий диск компьютера, свободного только для фридос, без CD/DVD-ридера.
Похоже, что в сети не так просто работать с сетями, поэтому я обратился к USB-флешкам: но даже в этом случае USB-флешка, похоже, не смонтирована ни на одном из дисков DOS (пробовал A: till H: и Z:), и я не могу найти утилиту mount . Могут ли Freedos получить доступ к USB-накопителю?
2 ответа 2
Один из способов сделать USB-носитель видимым для FreeDOS 1.1 — это настроить BIOS и загрузочную среду до того, как система загрузится в сеанс, а затем получить доступ к USB-носителю.
Убедитесь, что BIOS системы поддерживает USB-накопитель. Например, в одном AMI BIOS настройка:
Расширенный | Конфигурация USB | Поддержка USB-накопителей | Включено
Не все BIOS имеют такую настройку. Например, по крайней мере один из работающих BIOS AMI Aptio 4.x не имеет такой опции (и доступ к USB все еще возможен).
При необходимости настройте BIOS системы, чтобы пользователь мог получить доступ к меню выбора загрузки BIOS. Обычно это включено по умолчанию, но может быть отключено. Как это сделать зависит от BIOS, но два примера BIOS:
Безопасность | Ботинок Sel. Доступ к всплывающему меню | кто-нибудь
Ботинок | Включить всплывающее меню загрузки | да
Подключите USB-носитель к системе перед загрузкой.
Используйте меню BIOS Boot Selection для загрузки системы — это НЕ означает, что USB-носитель загружен или даже является загрузочным.
Если USB-носитель НЕ отображается в меню выбора загрузки BIOS, может потребоваться проверка настроек BIOS или перезагрузка системы. На некоторых системах, если у меня есть носитель, который не отображается в меню выбора загрузки BIOS, он не будет виден FreeDOS после загрузки системы.
AUTOEXEC.BAT и FDCONFIG.SYS могут повлиять на удобство использования, но опыт показывает, что файлы, установленные по умолчанию, работают «из коробки».
Это решение не считается единственным способом доступа к USB-носителям, но оно доказало свою полезность для ряда встроенных систем.
Команда «fdapm poweroff», среди прочего, может использоваться для «безопасного» выключения системы путем очистки обработчиков дисков.
How to Create a USB Boot Disk Using FreeDOS
This article describes how to create a USB boot «disk» using FreeDOS. A DOS bootable USB stick still comes in handy for various maintenance tasks, but creating a DOS bootable USB «disk» is not always very straightforward. Hopefully this will help.
Contents
Partition the USB stick
Windows
If using Windows, your USB stick is mounted as something like E:. All operations must be performed as Administrator (right click, Run as Administrator) using Windows Vista, or Windows Server 2008. The Windows Preinstallation Environment (WinPE) 2.x should also work, for those that need it.
Then enter the following diskpart commands:
Linux
Linux uses the /dev meta-filesystem to list devices, so the USB disk may be something like /dev/sdb. You can use parted to prepare the boot disk on this device:
Depending on the size of your USB stick, you may need to replace fat16 by fat32, to use larger partition sizes.
If you see an error message like Partition Table: loop then be careful since it doesn’t support the «bootable» flag. To fix, you will need to run mklabel to change the label to msdos, then make a partition.
Install a boot loader
These instructions refer to ODIN, an unofficial FreeDOS distribution. Your mileage may vary.
Windows
It is probably easiest to use SYSLINUX. To do so, simply download and extract the archive. Let’s say you put it in C:\syslinux, and your USB stick is E:. Change to the location where you extracted SYSLINUX, and run it:
Create a new file E:\SYSLINUX.CFG as follows:
Copy the boot files from the FreeDOS «full» CD-ROM image (fdfullcd.iso) to your USB stick. In the following, assume the CD-ROM drive is mounted as D:.
Extract source\ukernel\boot\fat32lba.bin from D:\FREEDOS\PACKAGES\SRC_BASE\KERNELS.ZIP to the root of your USB drive and rename it to fat32lba.bss
Linux
Under Linux, you can install the bootloader using SYSLINUX or GRUB; I tried GRUB, with some help from a SYSLINUX file (memdisk.) To use GRUB, mount the USB stick (for example, as /mnt), then create the grub.conf configuration file:
Do this to install a small FreeDOS «ODIN» image to the USB stick:
To install GRUB into the MBR (master boot record), enter these commands into GRUB:
Note there’s two entries listed here, and you’ll probably see the same; that’s quite normal. The first one (0,0) is from /dev/sda, the main hard disk. You’ll have to go to the correct partition (1,0):
Boot and test
Your USB key should now boot directly into FreeDOS. You can modify the contents of the USB stick directly as you like.
How to access a USB stick from FreeDOS?
In relation with this question, I am trying to get some files onto the hard disk of a freedos-only computer without a CD/DVD reader.
Networking seems not to be easy under freedos, so I turned to USB sticks: but even then, the USB stick does not seem to be mounted on any of the DOS disks (tried A: till H: and Z:), and I cannot find a mount utility. Can freedos access usb mass storage?
![]()
2 Answers 2
One method that makes USB media visible to FreeDOS 1.1 is to setup the BIOS and boot environment before the system is booted into a session than needs access to the USB media.
Make sure that the system BIOS is set to support USB mass storage. For example, in one AMI BIOS, the setting is:
Advanced | USB Configuration | USB Storage Device Support | Enabled
Not all BIOS have a setting like this. For instance, at least one AMI Aptio 4.x BIOS worked with does not have such an option (and USB access is still possible).
As needed, set the system BIOS to allow the user to access the BIOS Boot Selection menu. This is usually enabled by default, but could be disabled. How to do this is BIOS dependent, but two BIOS examples are:
Security | Boot Sel. Popup Menu Access | Anybody
Boot | Enable Popup Boot Menu | Yes
Plug the USB media into the system prior to booting it.
Use the BIOS Boot Selection menu to boot the system — this DOES NOT mean that the USB media is booted or even that it is bootable.
If the USB media IS NOT shown on the BIOS Boot Selection menu, it may be necessary to check BIOS settings or power cycle the system. On several systems I have, if the media is not shown in the BIOS Boot Selection menu, it will not be visible to FreeDOS after the system boots.
AUTOEXEC.BAT and FDCONFIG.SYS may affect usability, but experience shows that the files installed by default work out-of-the-box.
This solution is not touted to be the only way to access USB media, but it is one proven to be useful on a number of embedded systems.
The ‘fdapm poweroff’ command, among others, may be used to shutdown the system «safely» by flushing the disk handlers.
baronp
Возникла на днях острая необходимость перешить биос не самой новой материнской платы K9N Neo V2 фирмы MSI. Эта самая неновость сильно ограничила количество путей решения данной задачи. Оcталость их, в общем, то всего два, и я, естетственно, выбрал в итоге тот, что поизвращеннее. Биос тут от AMI, соответственно для других фирм имена файлов будут другие и синтаксис команд прошивки может отличаться, но логика действий примерно та же.
Achtung! Любые манипуляции с биосом могут привести (и приведут) к полной неработоспособности железа, при значениях радиуса кривизны рук ниже критического. Без понимания, что и зачем делается лезть сюда не стоит.