Need Help Editing Boot Manager

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
ZekeMenuar

Need Help Editing Boot Manager

Post by ZekeMenuar »

Running Enpower EN660 also known as a MSI-600
Intel Core 2 Duo T7100
4GB RAM
Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
WD 120gb Scorpio HD

Mint 7 64 bit installed as the only OS. No Windows here.

Two weeks ago, I created an Emergency OS on my mini flash reader using a 4gb mini SD card. It has Mint 7 32bit installed. Runs great.
There is a minor issue that needs to be corrected. It's bugging the user.
When using the flashdrive it will only boot up when the main HD isn't in the laptop.
I've tried every setting in the BIOS including disabling the HD. If I try to boot from the flashdrive with the HD installed, the flashdrive OS won't boot.
The boot process gets just past the second splash screen, then it looks for a dev/sba1? or something like that. Then the boot process stops.
If the HD is installed and the flashdrive is installed, I can reset the BIOS and boot from the main HD.

Is it possible to reconfigure the boot settings to allow for a "if this happens, do that" scenario?
If the Flashdrive is plugged in and the HD is installed, I want to boot to the Flashdrive OS.
If the Flashdrive is not plugged in, I want to boot to the HD. If this means a trip through the BIOS, that's OK.
I'm a Mint noob and not very comfortable using terminal yet. I'd like to know if the above scenario is possible and how I should go about doing it.

Before someone tells me to run sudo gedit /boot/grub/menu.lst

Main hard drive
## ## End Default Options ##

title Linux Mint 7 Gloria x64, kernel 2.6.28-13-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.28-13-generic root=/dev/sda5 ro splash
initrd /boot/initrd.img-2.6.28-13-generic
quiet

title Linux Mint 7 Gloria x64, kernel 2.6.28-13-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.28-13-generic root=/dev/sda5 ro single
initrd /boot/initrd.img-2.6.28-13-generic

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

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

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Emergency Flashdrive
## ## End Default Options ##

title Linux Mint 7 Gloria Emergency Drive, kernel 2.6.28-13-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-13-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.28-13-generic
quiet

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

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Thanks in advance

ZM
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.
lagagnon

Re: Need Help Editing Boot Manager

Post by lagagnon »

In your BIOS is there some sort of option like "boot from USB device", because you would have to have that I believe in order to do what you want....if so, set the USB device to the first boot device.
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

lagagnon wrote:In your BIOS is there some sort of option like "boot from USB device", because you would have to have that I believe in order to do what you want....if so, set the USB device to the first boot device.
Been there, tried that. Not only can my BIOS boot from USB, it treats each flashdrive or HD the same.
I've tried every combination available in the BIOS to make the flashdrive boot before the HD.
I can boot to the flashdrive OS just fine, but only when the HD is physically not in the laptop.
saxoli

Re: Need Help Editing Boot Manager

Post by saxoli »

Hello,

I hope I can help ??!!

Look at this posts .. http://forums.linuxmint.com/viewtopic.p ... id#p154864

I think it's the same problem with grub counting of HD's and Partitions.

Try booting with UUID's of your drives.

Greetings,


Oliver
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

You are going about this from the wrong side. What you need to do is set the BIOS so it boots the hard drive before the usb drive. Put a chainload stanza at the end of the menu.lst on the hard drive pointing to the usb partition. With the grub command, set the grub to the usb boot partition, to point to its' menu.lst.

If you don't know how to do that post back and I'll tell you. If you need instructions please post a screen shot from gparted with both drives attached. For both drives.

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

Fred wrote:ZekeMenuar,

You are going about this from the wrong side. What you need to do is set the BIOS so it boots the hard drive before the usb drive. Put a chainload stanza at the end of the menu.lst on the hard drive pointing to the usb partition. With the grub command, set the grub to the usb boot partition, to point to its' menu.lst.

If you don't know how to do that post back and I'll tell you. If you need instructions please post a screen shot from gparted with both drives attached. For both drives.

Fred
OK, you're on. I don't have any idea how to do the editing. Here are the pics you asked for. "sudo gedit /boot/grub/menu.lst" is listed in the original post.

Flash Drive
Image

Main HD
Image

If something bad happens, I can reinstall in less than an hour. I'm really good at that :mrgreen:
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

Thought I forgot you didn't you? Ok... here we go. :-)

With the usb drive inserted set your BIOS so it will boot into your hard drive install. Boot it up to the desktop. Open a terminal and type:

gksu gedit /boot/grub/menu.lst

This will open your menu.lst file for editing. Put the below stanza in as shown below, at the end of the file, after the line:

### END DEBIAN AUTOMAGIC KERNELS LIST

title Linux Mint 7 Gloria Emergency Drive
root (hd2,0)
chainloader +1

Save and close the file and close the terminal.

Make sure your usb drive is mounted. It should be already. Then open a terminal and type:

sudo grub

root (hd2,0)

setup (hd2)

quit

sudo grub

root (hd2,0)

setup (hd2,0)

quit

Close the terminal. Ok... now we need to modify the menu.lst for the usb drive. I don't know what it is called in the /media folder. It will be mounted there. I will call it usbd but I know that is wrong. You will have to change it below. Open a terminal and type:

gksu gedit /media/usbd/boot/grub/menu.lst

That should open the flash drive menu.lst file. Change it as I have it below. Everything I have in bold.

timeout 5

# kopt=root=/dev/sdc1 Maybe more stuff here. Leave it as is.

# groot=(hd2,0) Maybe more stuff here. Leave it as is.

## ## End Default Options ##

title Linux Mint 7 Gloria Emergency Drive, kernel 2.6.28-13-generic
root (hd2,0)
kernel /boot/vmlinuz-2.6.28-13-generic root=/dev/sdc1 ro quiet splash
initrd /boot/initrd.img-2.6.28-13-generic
quiet

title Linux Mint 7 Gloria, kernel 2.6.28-13-generic (recovery mode)
root (hd2,0)
kernel /boot/vmlinuz-2.6.28-13-generic root=/dev/sdc1 ro single
initrd /boot/initrd.img-2.6.28-13-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Save and close the file. Close the terminal.

Ok, the moment of truth. :-) Reboot and pick an install to boot into. Then boot into the other one. Don't dare touch the BIOS. :-)

Let me know what errors you get, if any. I won't guarantee I didn't make a mistake. :-)

Fred
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

Where did you go, I am beginning to get worried about you. :-)

And I did forget something, so don't think it was something you did. I forgot to fix the /etc/fstab file on the flash drive. So that is why it won't boot. Post your /etc/fstab file on your flash drive so I can see it please. Sorry for the omission. :-)

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

Fred wrote:ZekeMenuar,

Where did you go, I am beginning to get worried about you. :-)

And I did forget something, so don't think it was something you did. I forgot to fix the /etc/fstab file on the flash drive. So that is why it won't boot. Post your /etc/fstab file on your flash drive so I can see it please. Sorry for the omission. :-)

Fred
Give me a little time. I'll have to pull the drive out after I'm done watching some mindless internet TV.
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

No problem. I was just afraid you had gotten hung up somewhere.

By all means, take your time. :-)

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

Fred wrote:ZekeMenuar,

Where did you go, I am beginning to get worried about you. :-)

And I did forget something, so don't think it was something you did. I forgot to fix the /etc/fstab file on the flash drive. So that is why it won't boot. Post your /etc/fstab file on your flash drive so I can see it please. Sorry for the omission. :-)

Fred
As you requested.

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=aa4384ac-4fe2-46bd-9cdc-12f954481cb0 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=4d8643e8-ceae-4add-a05b-8ec6c7708b74 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

I put the HD drive in an external enclosure so I don't need to take it in and out all the time. I'll run the flashdrive OS until further notice or until tomorrow AM when I have to take the Crack-top on the road.

Thanks Fred

ZM
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

Your fstab file looks ok after all. Follow the instructions I gave you and hopefully your system should operate ok.

When you boot you should get the menu for the hard drive. If you do nothing it will default to the hard drive install. If you select the flash drive and it is plugged in it should go to the flash drive menu for 5 seconds and then boot into the install on the flash drive.

Let me know how it works out for you or if you have a problem.

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

I'll be trying it sometime today. I'll post the results when I give it a try.

Hopefully this doesn't happen :mrgreen: :mrgreen: :mrgreen:

Image

Thanks again for your help

ZM
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

Good morning sir. lol... Yes, let's hope we don't have an event of that magnitude. :-)

By-the-way, that is a great picture.

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

Fred wrote:ZekeMenuar,

Thought I forgot you didn't you? Ok... here we go. :-)

With the usb drive inserted set your BIOS so it will boot into your hard drive install. Boot it up to the desktop. Open a terminal and type:

gksu gedit /boot/grub/menu.lst

This will open your menu.lst file for editing. Put the below stanza in as shown below, at the end of the file, after the line:

### END DEBIAN AUTOMAGIC KERNELS LIST

title Linux Mint 7 Gloria Emergency Drive
root (hd2,0)
chainloader +1

Save and close the file and close the terminal.

Make sure your usb drive is mounted. It should be already. Then open a terminal and type:

sudo grub

root (hd2,0)

setup (hd2)

quit

sudo grub

root (hd2,0)

setup (hd2,0)

quit


Fred
It didn't work. The Terminal wouldn't take the commands after "sudo grub".

Then my wireless failed. Now I'm troubleshooting that problem.

Thanks

ZM
Fred

Re: Need Help Editing Boot Manager

Post by Fred »

ZekeMenuar,

You seem to be having the kind of luck I have sometimes. Sorry you are having wireless issues.

When you get back to our chore, please post a copy of what happens, error messages, etc., when you try to use the grub commands you referenced. Make sure both drives are connected.

Fred
ZekeMenuar

Re: Need Help Editing Boot Manager

Post by ZekeMenuar »

I fixed the wireless issue.

Delete partition and reinstall :mrgreen:
Locked

Return to “Installation & Boot”