[lfs-support] Error: invalid file name When Booting For theFirstTime

Alan Feuerbacher alanf00 at comcast.net
Sun Nov 24 06:06:48 PST 2013

On 11/24/2013 12:07 AM, Bruce Dubbs wrote:
> Alan Feuerbacher wrote:
>> Well I finally found the problem why linux would not boot: for some
>> reason grub is assigning (hd0) to /dev/sdb.
> I suspect that's because you installed GRUB on /dev/sdb.  IIRC, you did
> grub-install /dev/sdb, so I'd think that GRUB would assign that as hd0.

That's what I did, alright. I'm trying to keep everything related to 
this LFS installation on one disk, so as to avoid possibly messing up 
other disks due to my ignorance of how all this works. Of course, the 
whole reason I'm installing LFS is to reduce that ignorance.

> Remember that the only thing grub-install does is write the first track
> of the destination drive.  I'm not sure how you booted, but you must
> have told the bios to boot from the 2nd drive.

Correct. My ASUS UEFI BIOS (from American Megatrends) has buttons to 
boot from a specific drive.

 > I don't think GRUB has
> any way to tell what drive it boots from relative to the rest of the
> system, so it assumes that the drive with the boot track is hd0.

Interesting. I would consider that a bug, though. After all, grub finds 
all the drives and assigns them numbers (hd0), (hd1) etc. I would think 
that it could use the same algorithm as does the software that assigns 
sdX designations. I'm not sure what piece of software assigns "sda", 
"sdb" etc, but SOME piece of software does that in a deterministic way.

Also, I've read a pile of documentation on grub on the GNU website, and 
found nothing about how grub assigns the numbers aside from stuff like 
"/dev/sda -> (hd0). I think I'll contact the GNU folks about this.


More information about the lfs-support mailing list