Getting GRUB to work right

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

Getting GRUB to work right

Postby ddalley on Sat Aug 01, 2009 2:08 pm

GRUB is almost working the way I want, but the on-line GRUB instructions I've found, so far, are poor or not relevant and I still need a bit more patient help.

At the moment, I have two Mint 7 installs on USB sticks, one made with a hard drive working at the time of install and one made without. I don't want to use casper files, so these are "normal" installs. I also want these sticks to work with a couple of laptops we have, one with Vista, one with Linpus Lite (which needs replacing and is the main reason for this experiment).

When I go to boot each stick, I have to still have the HDD either working or not working as when I made each install, so each GRUB menu.list isn't quite right yet.

One stick at a time:

This is the menu.lst that needs to have the HDD with Windows (or Linux) not working (this desktop has two hard drives, one with Linux Mint 6 and one with Windows XP. I switch cables because a SATA port is dead.). When MintInstall made this install, each hd0,1 was actually hd1,1 and I had to find out what allowed Mint 7 to boot. This GRUB does boot Mint, but only if I unhook any HDD, so how do I make this work with either/any HDD attached? I presume I will also have to add a control for each drive, at some point.

## ## End Default Options ##

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda2 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Linux Mint 7 Gloria, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

I will check back later this evening, after class.
ddalley
Level 4
Level 4
 
Posts: 285
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Linux Mint is funded by ads and donations.
 

Re: Getting GRUB to work right

Postby Husse on Sat Aug 01, 2009 5:46 pm

I'm not quite sure I follow you but I think this wiki might help
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Getting GRUB to work right

Postby ddalley on Sat Aug 01, 2009 7:02 pm

OK, so I edited the menu.lst and device.map and it worked on the first try.
The stick that needed no HDD now boots with one working. That's good.

After the BIOS hands over control to Linux, does the device.map alone control the boot order?

The bad part is now, when it boots, I get a video error indicating something doesn't like the resolution setting.
I have no idea what caused it, but at least it continues to boot.
ddalley
Level 4
Level 4
 
Posts: 285
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: Getting GRUB to work right

Postby Husse on Sun Aug 02, 2009 6:39 am

Well you see the BIOS does not hand over control to Linux, this is not widely understood
The BIOS hands over control to Grub, which in itself is a "mini operating system"
It's the default line in menu.lst that boots (sorry for pointing out the obvious) and I think the device map is there so grub can get a grip of the situation - I'm not quite clear over what it does and how - especially when you use a chain link it plays a role
Not really any idea about the video error, but make sure that it does not boot from both the USB and the hard drive
I.e. both lines in menu.lst should be changed the same way not just one - if only one is changed that kind of strange behavior might occur
Fstab already uses UUID. The reason we don't have it in menu.lst is that gfxgrub - different from ordinary grub - does not use UUID
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Getting GRUB to work right

Postby ddalley on Sun Aug 02, 2009 12:40 pm

Husse wrote:Well you see the BIOS does not hand over control to Linux, this is not widely understood
The BIOS hands over control to Grub, which in itself is a "mini operating system"

Ok, I understand. I wasn't exactly sure to what part of Linux it passed the baton, so I just used the broad sense of Linux, even if GRUB isn't exactly part of it.

Husse wrote:Not really any idea about the video error, but make sure that it does not boot from both the USB and the hard drive
I.e. both lines in menu.lst should be changed the same way not just one - if only one is changed that kind of strange behavior might occur
Fstab already uses UUID. The reason we don't have it in menu.lst is that gfxgrub - different from ordinary grub - does not use UUID

This desktop has not been rebooted in a while, so when it is, I'll certainly check to see what happens.

I also have to check and see what happens when the USB stick is used to boot these laptops.
ddalley
Level 4
Level 4
 
Posts: 285
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada


Return to Installation & Boot

Who is online

Users browsing this forum: kartik0025, nonferrousbueller and 21 guests