Bootable USB Device with USB-ZIP BIOS
Hi,
Previously I asked about the actual creations of boot disk with USB which I intend to write what obstacles I encountered during the creation of bootable execution image and copying of the image onto the USB key [using USB Installer for Slackware script provided by Hameleers] -- I've already overcome these steps by the way. unfortunately, it turns out that I have a bigger problem to overcome first and that is to get the USB device (OCZ Diesel 4GB) to be recognized by the BIOS. I used Mr. Hameleers' script to create a bootable image along with Slackware CD which were copied onto the USB device accordingly (there is nothing wrong with the scripts by the way). His USB bootable installer creates two partitions, one on partition "1" execution bootable files (i.e. /dev/sda1) and the other on partition "2" (i.e. /dev/sda2), the regular Slackware DVD/CD data. However, what I found out was that my motherboard's BIOS (ASUS P4S333, BIOS AWARD) only has support for "USB-ZIP" but not "USB-HDD" -- ARGH! Then a gentleman (danielldaniell) pointed out to me that a document, /usr/doc/syslinux-3.52/README.usbkey, offers some explanation of my situation. So I read about the geometry of ZIP drives for USB-ZIP option and how they are viewed in such BIOS'. The description states that the partition must have 64 head and 32 sector in addition to having the linux bootable files on a single partition "4." So I made an endeavor to just do that (fdisk -C2048 -H64 -S32 /dev/sda) and created the "bootable" partition on 4 (i.e. /dev/sda4) and data on 2 (i.e. /dev/sda2) -- the data partition doesn't matter where it sits, partition 1, 2, or 3. The partition 4, /dev/sda4, was formatted with mkdosfs -F16 (vfat) and /dev/sda2 with mke2fs (ext2). Let me just add that Hamelee's USB installer script by default creates the bootable partition on "1" (i.e. /dev/sda1) and data on "2" (/dev/sda2). By the way, allow me to extend my gratitude to Mr. Hameleers for his hard work on this matter (and also recent Slackware 64-bit port). I have installed the bootable system images, once on partition 1 (script's default) and also on 4 (my modified version for address USB-ZIP concern) but with neither of the settings I was able to boot from the USB key. I even forgo of Slackware data partition and simply made a single bootable partition with system image on partition 4 (i.e. /dev/sda4) with 64(header)/32(sector) geometry -- no result. Then I changed the cylinder numbers on the bootable partition from 2048 to 1024 (fdisk -C1024 -H64 -S32...) assuming that was the culprit; still a blank page when I boot with USB. I just don't know what else I am left to do. My question is, for USB-ZIP, what geometry size I need to set my bootable partition on to have it boot from USB? Sincerely, |
You might try to format the stick as a "superfloppy" without any partitions. This has worked for me with a similar BIOS which doesn't support booting from USB-HD.
Something like this, assuming /dev/sdc is the stick: mkdosfs -IF32 /dev/sdc mount /dev/sdc /mnt/tmp mkdir /mnt/tmp/syslinux cp /boot/initrd.gz /mnt/tmp/syslinux cp /boot/vmlinuz /mnt/tmp/syslinux kedit /mnt/tmp/syslinux/syslinux.cfg Add: default vmlinuz initrd=initrd.gz umount /mnt/tmp syslinux /dev/sdc Read more at: http://linuxconfig.dyndns.org/lazy/L.../Boot/Syslinux Good luck! |
Hello,
Your 4th partition isn't going to help you if your bios doesn't know what to do with the 1st. There are two ways around that that I can think of. The sure bet would be to get the Super Grub CD, if you can burn and boot from CD. The other that I'm 90% sure about would be to write a fragment of your 4th partition to your 1st with: Code:
dd if=/dev/sda4 of=/dev/sda1 bs=512 count=1 |
I think you may need to use the tool called 'makebootfat' -it can create a bootable drive for any (or all) of the formats: USB-HD, USB-ZIP and USB-FD
|
Quote:
|
Quote:
Sincerely, |
Quote:
cat /usr/lib/syslinux/mbr.bin > /dev/sdc or http://www.slackware.com/~alien/slackbuilds/ms-sys/pkg/ installpkg ms-sys-2.1.2-i486-1.tgz ms-sys --mbr95b /dev/sdc |
Quote:
1) Apparently after following the tutorial you offered, the partition table would look something like the following: Quote:
2) Then run `mkdosfs' (-I creates a "superfloppy" on the USB): Quote:
Quote:
3) Continuing with the procedure: Quote:
Quote:
Quote:
4) Working with `makebootfat' recommended by gnashley, I realized that the `syslinux' bootloader package installed on ALL slackwares (12.0 - current (32/64)), version "3.52" is utilized which is at least a few year-old package. So I grabbed the newest version of Syslinux (3.82) from kernel.org website. As a side Note: Interestingly, the old document that I had read before (/usr/doc/syslinux-3.52/README.usbkey) mentioned of use of `mkdiskimage' which wasn't working properly but apparently the newer version does comply to its contracted obligation (i.e. actually creating the table on partition 4). The newer version (syslinux-3.82) also provides several other images, i.e. syslinux-3.82/core/ldlinux.bss | ldlinux.sys and syslinux-3.82/mbr/mbr.bin). But I digress. Quote:
Quote:
And the `fdisk': Quote:
Upon the reboot, once USB-ZIP is selected in BIOS, I receive the following message: Quote:
Of course, there is no way I can mount the USB now because I don't know what filesystem should I mounted with (looking at the fdisk -l doesn't help). Any idea why this is not working? P.S. I'm going to write about `makebootfat' steps later on. |
ms-sys is douing much the same as using syslinux -that is, it is creating an MBR which makes the drive appear as a hard drive. If you use mkdosfs, then it makes the drive appear as a floppy drive. This is why you may need makebootfat -it can write the MBR so that it appears to be a bootable zip drive. To be honest, I do not know exactly what the difference is -I mean I don't know what the ZIP drive 'presents' to make the BIOS understand that it is a zip drive. As an aside, most bootable cdrom's also appear as a 'super-floppy' -that means there is no partition table at all -the first data on the disk is boot code and the data is located in the following sectors.
Edit: I was just reading the syslinux document you linked to. It looks to me like you need to create *only* partition 4. If you create 1,2 or 3 then it will not appear as a zip drive. This means that all your data and system would need to go in the that single partition. Edit: I just found a great resource for understanding disk structures, starting here: http://thestarman.pcministry.com/asm/mbr/index.html |
Quote:
Quote:
Quote:
After downloading the latest release of Syslinux (3.82), I ran the script (`mkdiskimage' is actually a Perl script) with the following flags (I deleted all the previously created partitions before starting these steps): (I tried to place the command lines in "code" blocks but the Firefox displays them with horizontal scroller bar. That's why I'm using a "quote" block) Quote:
Quote:
Quote:
Quote:
Quote:
After another boot from USB, once again I get "PRESS A KEY TO REBOOT". Next, I'll write about `makebootfat' (I'm down with a flu and pills have made me extremely lethargic and soporific, so I might as well inscribe it tomorrow but not for now). Meanwhile, if anyone sees a discrepancy or has a suggestion, please let me know. P.S. Loved the line by line Lilo assembly code examination of the linked tutorial on MBR and boot records you shared. Thank you. I got to start mass-bookmarking these links before I lose them. Perhaps, it is one of my motivations to post everything here just for my own future reference if I manage to get something working out of all this. |
As promised, I'm going to share step by step the process I undertook to invoke `makebootfat' program to create a bootable USB device.
Quote:
Quote:
Quote:
And finally run makebootfat 1.4 but since it depends on `syslinux' and I didn't have a good run with Slackware's syslinux package, I installed the the newest version, 3.82. Quote:
Time to reboot and... "PRESS A KEY TO REBOOT" message once again. Examining the content of the USB key: Quote:
Can any of you gurus tell me what I'm doing wrong? Sincerely, |
Have a look here:
http://advancemame.sourceforge.net/doc-makebootfat.html Excerpt: 7 Multi Standard USB Booting The BIOS USB boot support is generally differentiated in three categories: USB-HDD, USB-FDD and USB-ZIP. The USB-HDD (Hard Disk Drive) standard is the preferred choice and it requires the presence of a partition table in the first sector of the disk. You can create this type of disk using the -m option. The USB-FDD (Floppy Disk Drive) standard requires the presence of a filesystem starting from the first sector of the disk without a partition table. You can create this type of disk without using the -m option. The USB-ZIP (ZIP Drive) standard requires the presence of a device with a very specific geometry. Specifically, it requires a geometry with 32 sectors and 64 heads. It also requires the presence of a partition table with only a bootable partition in the fourth entry. You can create this type of disk using the -m and -Z option. Generally these standards are incompatible, but using the -m, -F and -Z options you can create a disk compatible with all of them. To use the -F option, the MBR image specified must follow the constrains: It must start with a standard FAT 3 bytes jump instruction. It must have the bytes from address 3 to 89 (included) unused. And example of such image is in the `mbrfat.bin' file. For example to create a syslinux image: makebootfat -o usb \ -Y \ -Z \ -b ldlinux.bss -m mbrfat.bin -F \ -c ldlinux.sys -c syslinux.cfg \ -c linux -c initrd.img \ image # End of excerpt The way I read it, to create a USB-ZIP-only device, you'd leave out the -m option and use the -Z option alone. But the multi-standard device may give the best chance of being usable. mbr.bin is a hard-disk MBR. mbrfat.bin appears to be a super-floppy MBR. A regular floppy device would not use the -m option at all. The fact that the sectors and heads are not being correctly created is probably due to the 4GB size of your device (1GB drive seems to work most reliably). You may have to manually create the device using the normal tools in order to set the needed geometry. Or, use the above method and then use fdisk or sfdisk to adjust the geometry to the correct values. Also see here: http://puppylinux.com/news/news400a5-400a7.htm Excerpt: 'ComboFormat' added to Universal Installer March 3rd, 2008 I have a PC that is extremely fussy about what USB stick will boot on it. The BIOS setup has USB-FLOPPY, USB-HDD and USB-ZIP settings but I can only get the last one to work, and even that is very fussy. I can't get 1GB and larger sticks to boot, so I experimented with a combination of small FAT16 partition and a ext2 partition to fill the rest of the drive. This works, with the USB-ZIP setting. I couldn't think of any better name, so I named this dual-partition setup "ComboFormat" and have added this to the Universal Installer. Note that this is very much under development. JustGreg is doing a lot of work getting USB drives to boot. The "ComboFormat" solution that I have devised so far is not a universal solution, as it won't boot on my Classmate laptop (another extremely fussy PC for USB booting). I appreciate you following up by posting what you are trying. |
Quote:
Quote:
Quote:
Well, that's a new one. I tried to boot with either USB-FDD and USB-ZIP options selected in the BIOS, same result. Interestingly, as I was checking the POST message, I realized that the BIOS is reporting the following: Quote:
Quote:
Quote:
Quote:
Quote:
|
"how can I change the partition table?" Use the advanced features of fdisk to reset the geometry, then delete the existing partitions. Create a new partition giving "4" as the number to use. Let is span the whole device. Set the bootable flag for the new partition.
Again, the 4GB size is probably a problem. To work around it, you could create a smaller file (504MB may be the ideal size). Then use losetup to partition it and do the other operations. Then use dd or cat to write the whole thing to the raw device. This will ensure the smaller size. I'm sure you are having lots of fun with all this -even if losing a bit of hair! |
Quote:
Creating a USB boot disk with "-m -Z, and -F" options: Quote:
Quote:
Quote:
Writing the image back from the hard drive onto the USB: Quote:
Yup, 4 hrs 10 mins on USB 1.1 and the results... Quote:
Quote:
|
All times are GMT -5. The time now is 04:40 PM. |