Error when partitioning Lexar USB drive for use as FreeDOS bootable
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Error when partitioning Lexar USB drive for use as FreeDOS bootable
I'm not sure if this is the right board for my problem, but...
I'm trying to update the BIOS on my HP Probook 450 G1, but HP doesn't offer an update utility for Linux users. After some googling, I figured out that I could make a FreeDOS bootable USB drive and run the DOS utility on that. I'm following a guide (http://freedos.sourceforge.net/wiki/index.php/USB) to make the bootable drive, since I'm not terribly tech-savvy.
Anyway, when I run
Code:
sudo parted /media/will/Lexar mklabel msdos
I get an error message:
Code:
Warning: Unable to open /media/will/Lexar read-write (Is a directory).
/media/will/Lexar has been opened read-only.
Warning: Unable to open /media/will/Lexar read-write (Is a directory).
/media/will/Lexar has been opened read-only.
Error: Is a directory during read on /media/will/Lexar
Retry/Ignore/Cancel?
I can write files to the drive just fine in the file manager. What can I do to fix this?
I had same problem once. Without thinking much I created a FreeDOS bootable image and flashed my BIOS from USB. I still have this image. Linky. Put it on a USB stick with dd, add your files and boot it. Hopefully it will work for you as it worked for me.
The instructons tell you to write to the device not to the mount point as you show your command. Look at the link you posted for the instructions you are using and you see it tells you to do: parted /dev/sdb mklabel msdos
That should work if your flash drive is actually sdb. No way for anyone here to tell, you would have to run the fdisk -l command as root user to get that info or use parted -l. If you don't understand the output, post it here and someone will explain. Using dd might be simpler.
Unpack the bz2 file you downloaded. Plug in your USB drive, run
Code:
fdisk -l
it will show you your drives. Take a note of your USB drive, if you have only one hard drive it will be sdb, following example assumes it is sdb. Switch over to root
Code:
sudo -i
run
Code:
dd if=/path/to/image/freedos.img of=/dev/sdb
Make a directory for mount point
Code:
mkdir /mnt/tmp
Mount the USB drive
Code:
mount /dev/sdb /mnt/tmp
Copy your files to /mnt/tmp/. Reboot, make sure you select your USB drive as boot drive.
Big fat warning - dd will destroy everything you have in sdb.
Okay Emerson, I followed your directions and ran into two problems:
1) Despite the drive being 500MB and the contents of freedos.img only being about 3MB, there's apparently only 3KB of space left on the drive. The BIOS update file I need is 10MB.
2) I can boot through the USB, but doing so just leads me to a CLI-looking screen with the words "reeDOS" (not "FreeDOS") at the top. Any keystrokes I make just result in a loud BEEPing sound.
So it looks like your method is a bust on my machine. Thanks for trying to help, anyway. I'll keep plugging away at the wiki instructions and see if I can get them to work.
If your flash drive is almost full from your attempts to write to it, format it which will overwrite everything and leave you with a blank flsh drive.
In your initial post, you showed the command you used which was not what the link told you to do. You need to write to the device not to the mount point as you were doing and that is why you got the error you posted. If your device is actually sdb (we're guessing here as you have not posted any actual drive/partition information) the command you would enter per the site instructions is:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.