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

Re: Booting a USB hard drive



On Tuesday, May 10, 2011 05:13:46 am Camaleón wrote:
> On Mon, 09 May 2011 13:21:20 -0700, Peter Bonucci wrote:
> > On Monday, May 09, 2011 10:25:44 am Camaleón wrote:
> >> > Booting a USB drive when the drive and computer don't cooperate is an
> >> > old problem.  People solved it under Debian years ago.  I just don't
> >> > know how they solved it and search engines didn't help.
> >> 
> >> There shouldn't be any mistery for this. If the BIOS is capable of
> >> booting from a USB device but the drive where Debian has been installed
> >> is bypassed by the BIOS, I would check that:
> >> 
> >> 1/ GRUB is installed into the MBR of the USB disk.
> > 
> > I believe I did this while installing Debian on the USB drive.  How can
> > I verify it?
> 
> Last time I needed to know where was GRUB installed I used:
> 
> dd if=/dev/sda bs=512 count=1 | od -a | grep G
> 
> (where "sda" is the disk of which MBR is to be queried)
> 
> >> 2/ Partition where "/boot" is installed is marked with the bootable
> >> flag (if there is no dedicated partition for "/boot", then "/" should
> >> be the one to be marked).
> > 
> > Already done.  The "/" directory is marked boot.
> 
> Fine. As Arno suggests this is not usually needed but is better to do it,
> just in case.
> 
> >> 3/ The system can be properly booted from an external source (i.e.,
> >> using a LiveCD of SuperGrubDisk).
> > 
> > The laptop boots from its own hard disk.
> 
> Yep, but as GRUB2 is being bypassed, we need to know if there is any
> problem with GRUB2, so we are checking if it's installed in the MBR and
> also if it's properly installed on the partition.
> 
> > Under SuperGrubDisk, "List devices/partitions", Grub doesn't see the USB
> > drive.  None of the other options boot the drive.
> > 
> > Selecting the experimental USB support doesn't seem to change anything.
> 
> How is that? It should be accesible by SGD :-?
> 
> http://www.supergrubdisk.org/wiki/USB_Boot
> 
> But I'm starting to think the problem may be on the Western Digital USB
> drive, as you said you were only facing problems with this concrete USB
> disk... Look, it seems there is one report on WD forums:
> 
> How to boot linux from My passport
> http://community.wdc.com/t5/My-Passport-for-PC/How-to-boot-linux-from-My-pa
> ssport/td-p/74214
> 
> Greetings,

This is where I am now:

As Larry suggested, I removed the virtual CD from the drive.
I reinstalled Debian on the USB drive.
SuperGrubDisk v1.98s1 does not see the drive, or any of 5 flash drives.
SuperGrubDisk v0.9977 does see the drive.  
  It reports the drive it as hd1 with a size of 0 K
  It does see the 5 flash drives and reports the correct sizes.

file -s /dev/sdb returns:
/dev/sdb: x86 boot sector; 
partition 1: 
  ID=0x83, active, starthead 32, startsector 2048, 488280064 sectors; 
partition 2: 
  ID=0x82, starthead 254, startsector 488282112, 19531776 sectors; 
partition 3: 
  ID=0x7, starthead 254, startsector 507813888, 468889600 sectors, 
  code offset 0x63

dd if=/dev/sdb ibs=512 count=1 | od -a | grep G returns:
1+0 records in
1+0 records out
512 bytes (512 B) copied, 7.8496e-05 s, 6.5 MB/s
0000260 eot   @  bs   D del  ht   D stx   G eot dle nul   f  vt  rs   \
0000300   |   f  ht   \  bs   f  vt  rs   `   |   f  ht   \  ff   G   D
0000600   G   R   U   B  sp nul   G   e   o   m nul   H   a   r   d  sp

Fdisk -l says:
Disk /dev/sdb: 500 GB, 500072348160 bytes
255 heads, 63 sectors/track, 60797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1   *           1       30395   244147806   83  Linux
Warning: Partition 1 does not end on cylinder boundary.
/dev/sdb2           30395       31610     9759487   82  Linux swap
Warning: Partition 2 does not end on cylinder boundary.
/dev/sdb3           31610       60797   234444577    7  HPFS/NTFS
Warning: Partition 3 does not end on cylinder boundary.

The USB Legacy option is enabled in the BIOS.


If grub is in the MBR for the USB drive shouldn't I be able to boot it?
Do you understand what is going on here?


Peter





Reply to: