Getting GRUB to work right

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ddalley
Level 4
Level 4
Posts: 303
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Getting GRUB to work right

Post by ddalley »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Re: Getting GRUB to work right

Post by Husse »

I'm not quite sure I follow you but I think this wiki might help
ddalley
Level 4
Level 4
Posts: 303
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: Getting GRUB to work right

Post by ddalley »

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.
Husse

Re: Getting GRUB to work right

Post by Husse »

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
ddalley
Level 4
Level 4
Posts: 303
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: Getting GRUB to work right

Post by ddalley »

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.
Locked

Return to “Installation & Boot”