[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dangerous course of action suggested by USB boot instructions?



Lennart Sorensen wrote:
If it is really slow, you might be running with sync mount, which is a
very very bad idea for flash memory.

My mistake, that's what I was doing. Thanks for the tip. :)

And if you don't write a boot block to the device what makes it
bootable?  Unless USB booting is even more screwy that I thought (I have
ever bothered to try it), then it should still need a bootable device to
boot which would require something writing to the MBR of the device.

Yes: that's why, on the same page [1], the guide suggests doing:

# install-mbr /dev/sda

However, this doesn't work (tested on two different laptops from different manufacturers): the BIOS saw the stick and tried to boot, but I only got something like the following output:

MBR
Boot error

Unfortunately, once you've done zcat boot.img > /dev/sda, your original MBR is gone, so you can't even restore it. The user is now shafted. :)

What does work, however, is using the mbr.bin file contained in the syslinux distribution (it's not included in the Debian package of syslinux, not sure why):

# cat mbr.bin > /dev/sda

In any case, I would suggest that the instructions [1] be changed to something like the following:

1. zcat boot.img > /dev/sda1
2. If the stick doesn't boot, cat mbr.bin > /dev/sda

In this way:

1. The stick's MBR is not going to be trashed and replaced by something that doesn't work. 2. The user will still be able to see and access [the first 128 MB of] the stick from Windows as well, and even reformat it to restore it to its original capacity.


Cheers,
Lorenzo

[1] http://d-i.alioth.debian.org/manual/en.i386/ch04s04.html

--
Lorenzo Colitti                          http://www.colitti.com/lorenzo/



Reply to: