Perplexing Problem

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Perplexing Problem

Postby Mike42 on Sun Jun 07, 2009 9:01 pm

In all of my linux installs I have never had this problem. When trying to install Mint 7 I could not get grub to work at all. So being lazy I just decided to up plug my other hard drives and just keep the hdd I wanted mint to install on. I set up my mobo's BIOS so that I just boot off the mint hdd. Everything went great until I tried to boot into mint with my other hard drives plugged in. Now mint crash's after GRUB when it I think tries to mount my install (I think that is the right way to describe it). So as of right now, my 'duel boot' setup requires my to unplug sata cables in order to boot into the OS I want. As you can guess, this is far from ideal. Any help would be greatly appreciated.
-Mike
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Linux Mint is funded by ads and donations.
 

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 12:07 am

My guess is that when you plug in your other hard drives, the drive assignments change. So what was /dev/sda1 may now be /dev/sdb1 or whatever. So GRUB can't find the root system. Can you post your /etc/fstab and /boot/grub/menu.lst files here?
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 1:48 pm

All right, so with the idea that the disk order had changed when booting into grub I just typed sdc1 instead of sda1 and everything worked great. So is the only file I have to edit is the menu.lst to make this permanent? I worry that there is another file that might need to be also edited. I also am wondering what is the best way to add windows xp to the menu.
Thanks a bunch,
Mike
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 1:57 pm

Yes, menu.lst should be the only file you need to edit. As for adding windows, it should have been added automatically but if not just add these lines to your /boot/grub/menu.lst file:

title Windows XP
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


That is assuming that your winblows installation is on the 1st partition of the 1st hard drive. It would be much easier to give you a definitive answer if you post your /etc/fstab and the relevant sections of the menu.lst files here.
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 2:03 pm

# /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=170f1df8-9d16-48d7-851a-ddb797830069 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=2adb88f5-3d73-4559-9e57-facf0c75b64d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0


## ## End Default Options ##

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 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,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.28-11-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 2:14 pm

OK, so your linux installation is on the first partition of the first disk. Where do you have your windows installed? Is it possible you have overwritten it?

By default windows installs on the 1st partition of the 1st hard drive (/dev/sda1 or hd0,0) which is where your linux is. It seems likely you have overwritten your windows installation.

Could you post the ouptput of
Code: Select all
sudo fdisk -l /dev/sda
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 2:34 pm

There is no way I installed over windoes because I can boot into it just fine. Here is the out put you requested.

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95a195a1

Device Boot Start End Blocks Id System
/dev/sda1 * 1 24791 199133676 7 HPFS/NTFS
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 2:59 pm

Well, something is wrong here... your menu.lst shows your root partition to be hda0,0 so sda1. But sda1 is an NTFS partition. Are the commands you posted run with all disks plugged in?
In any case, once you figure out which partition your windows drive is on, the lines I posted above (with the relevant partition if not hd0,0) should work.

So, if possible, boot into linux with ALL frived plugged in and then run
Code: Select all
blkid


that will give you a listing of all your aprtitions, their UUID and dev names as well as their file system. Post the output here and we should be able to add windows correctly.

Also check out this thread for more information.
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 3:08 pm

All 3 of the hardrives are pluged in. I edited menu.lst such that all of the sda1 were changed to sdc1 and now I boot into mint fine. However, I still need to nail down the location of the windoes install so I can also boot into that from grub rather then changing the boot order in the mobo bios.

/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="E43C12FE3C12CC04" TYPE="ntfs"
/dev/sdb1: UUID="C6B0B1A4B0B19AFF" LABEL="Download1" TYPE="ntfs"
/dev/sdb5: UUID="db0bafda-8dd5-418a-a2f9-2212391b926a" TYPE="swap"
/dev/sdc1: UUID="170f1df8-9d16-48d7-851a-ddb797830069" TYPE="ext3"
/dev/sdc5: UUID="2adb88f5-3d73-4559-9e57-facf0c75b64d" TYPE="swap"
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 3:53 pm

It looks like your windows "C" drive is sda1 and you had another drive under windows called "Download1" which is sdb1. If that is so the following lines in your menu.lst should do the trick:

Code: Select all
title      Windows XP
rootnoverify   (hd0,0)
savedefault
makeactive
chainloader   +1
 


An easy way to check where your windows installation is would be to make a temp dir and mount the drive there:
Code: Select all
mkdir test
sudo mount -t ntfs /dev/sda1 test
ls test


This will mount /dev/sda1 on test and list its contents. Look for the windows dirs, like "Documents and Settings" or "Windows"
Then, to unmount:
Code: Select all
sudo umount test
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 3:58 pm

I mounted my windows drive so that I could listen to some of my music I had on it, I am going to reboot and see if now GRUB is going to work how I want it to now, but I am wondering what exactly does the hd(x,y) mean? I am guess x=the drive and y=partition?

EDIT: ok, I tried booting into windows with GRUB and got Error:13 Invalid executable. Here is what my menu.lst looks like now (there is another menu.lst~ I am assuming the ~ denotes is a back up):
## ## End Default Options ##

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdc1 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,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdc1 ro single
initrd /boot/initrd.img-2.6.28-11-generic

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

title Windows XP
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


### END DEBIAN AUTOMAGIC KERNELS LIST
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby emorrp1 on Mon Jun 08, 2009 7:07 pm

You guess correctly (starting from 0), hence explaining why windows won't start: You're trying to chainload it to the same partition as mint. Try rootnoverify (hd1,0) or rootnoverify (hd2,0). If it's still not working, post the contents of /boot/grub/device.map which shows the link between the (hdx) and /dev/sdx naming. Also you don't need more than one swap partition.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Perplexing Problem

Postby terdon on Mon Jun 08, 2009 7:22 pm

OK, we are now rapidly approaching the end of my expertise... Nevertheless, here goes.

As you said in the (x,y) line x=drive (starting at 0 NOT 1) and y=partition. So, it is strange that all your entries have (hd0,0) I would have thought you'd get an error booting into linux with that. From what I can understand of your setup, the linux entries should be (hd2,0). However, that shouldn't affect your windows and if it ain't broke...

Are you sure windows is on /dev/hda1? You have 2 NTFS partitions, could it be on the other one, Downloads1?

Oh, and yes the "~" means a backup file.
User avatar
terdon
Level 4
Level 4
 
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Perplexing Problem

Postby Mike42 on Mon Jun 08, 2009 8:45 pm

Download1 is just a drive I have for storage, windows is on sda... but yah, I have no clue why grub is working...
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby emorrp1 on Tue Jun 09, 2009 4:34 am

Mike, please post contents of /boot/grub/device.map so we can see what it's meant to be. At the moment your menu.lst is trying to load everything off the first partition of the linux mint drive.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Perplexing Problem

Postby Mike42 on Tue Jun 09, 2009 12:17 pm

Okay.... I can see why this would be a problem...

(hd0) /dev/sda
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Re: Perplexing Problem

Postby emorrp1 on Tue Jun 09, 2009 12:37 pm

well if that's the entirety of your device.map then I'm stumped, as it suggests it only detects a single hard-drive. You could try adding additional lines manually e.g. (hd1) /dev/sdc or something, other than that, I stick with trying (hd1,0) or (hd2,0) on the windows section until it boots.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Perplexing Problem

Postby Mike42 on Tue Jun 09, 2009 5:05 pm

Ok, I guess I will do some guess and check... thanks for all of the help!
Mike42
Level 1
Level 1
 
Posts: 11
Joined: Sun Jun 07, 2009 8:52 pm

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Google [Bot], MrPez and 14 guests