Page 1 of 1

bypass multi-card reader during Boot from USB

Posted: Thu Apr 07, 2011 11:14 pm
by Paul Unger
I'm trying to run Linux from a USB flash drive on my x201. I also have an SD card in the card-reader slot for daily backups of my work. I've entered the BIOS to adjust the boot order, but I'm facing a number of issues:
1. What's the difference between USB FDD and USB HDD? Other than the obvious (floppy vs. hard)? How does the machine differentiate FDD from HDD?
2. If I move USB HDD before the fixed HD, it tries to boot from the SD card before the USB flash drive. At least that what I think is going on--the machine goes into a reboot loop once it gets to the Lenovo splash sceen. If I pop the SD card out, it boots from the USB flash drive just fine.
Q: can I bypass the SD card from the boot order? I'd like to leave it in and forget about it...

Thanks for any help,

Paul

Re: bypass multi-card reader during Boot from USB

Posted: Fri May 06, 2011 10:43 am
by ozzymud
#1... you pretty much summed it up yourself... floppy versus hard... obvious... same way the bios looks at it...

#2 and your Q... Have you considered installing grub to the SD card? ... I mean you leave it in all the time... and it can be configured from the SD card to boot the usb drive.

Re: bypass multi-card reader during Boot from USB

Posted: Sat May 07, 2011 4:49 am
by Paul Unger
Guess I wasn't clear enough... :oops:

I don't want to boot from the SD card--I use it for backups. I want to boot from a USB flash drive--one that I plug into a USB port. However, the SD card reader is listed along with the rest of the USB devices in the BIOS list. Is there any way to remove the SD card from the boot list, while retaining boot-from-USB functionality?

Re: bypass multi-card reader during Boot from USB [tiny pic]

Posted: Sat May 07, 2011 10:53 am
by ozzymud
Unless you can set the order of the usb devices (don't think i've seen that in a bios), then no...

but i aint talking about necessarily booting from the SD... well sorta... but only the bootloader, grub

If you leave the SD in all the time, then you can install the bootloader only to it, and have it boot whichever drive you want to boot... another option is a differant boot loader on the SD... i seen one on a floppy that says on boot when the (non bootable) floppy is left in "You accidentally left the floppy in the drive, booting from hard disk".

It prevents the "Non system disk" error and just skips itself... shouldn't be too hard to "dd" the bootsector from this type of floppy and then "dd" it back to the SD card.

The reboot loop you are getting now is because the SD is the 1st boot device and with media in it, it is selected for boot, doesn't, then the machine reboots to try again... dunno why you aint getting the non system disk error though.

I'll try to hunt for that boot sector that bypasses itself...

EDIT: here is a page that talks about said sector...
http://www.paulcilwa.com/writing/techni ... /index.asp

EDIT2: Ok, i found the bootsector i was talking about, it was from winimage... he uses one written by C.H. Hochstatter... which has a freeware tool fdformat on simtel

Using this, vfd(virtual floppy drive), and dd for windows... i formatted a floppy with it, then extracted the 512 byte bootsect.bin

then proceeded to write it back to an SD card...

Code: Select all

dd if=bootsect.bin of=/dev/sd_card bs=512 count=1
explanation of the previous command:
  1. dd - the command in linux
  2. if - input file (in this case bootsect.bin
  3. of - output file (in this case the device for my sd card)
  4. bs - block size (512 bytes, the size of the bootsector)
  5. count - 1, for 1 block, don't wanna ruin the rest of the disks data
Then i proceeded to set my boot order to USB, floppy, CD...

on reboot in a mchine with only a multi card reader and a usb hard disk attached and SD card in the slot i got this:
Image

Would this work for you? :P

Re: bypass multi-card reader during Boot from USB

Posted: Sun May 08, 2011 2:56 pm
by Paul Unger
OK, that's an impressive bit of work! But I'm thinking that F12 on boot (which invokes the Boot Device List) is going to be easier for me when I want to boot from a USB drive rather than a Multi-card reader drive... Sorry to make you go through all the trouble. :oops: