LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-19-2008, 08:48 PM   #1
kschmitz2
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
Arrow Help with Multiple Linux install and Grub [Solved!]


All,

Need some help!

I currently have a working system with the following 3 hard drives and partitions:

Partition.....Filesys.....Use......................................Notes
SDA1..........NTFS.......Win Xp.................................Primary
SDA3..........ext3........Debian i386 (Sid)...................Primary
SDA4..........ext3........New Deb AMD64 Etch Install....Primary
SDA5..........FAT32..Windows_D(share with Linux).......Logical / Extended
SDA6..........Linux Swap
SDA7..........ext3........Chroot for Deb AMD64 install....Logical / Extended
SDA8..........ext3........Debian i386 /usr.....................Logical / Extended
SDA9..........ext3........Debian AMD64 /usr .................Logical / Extended

The other 2 hard drives have non executable data and home directories for both Linux distributions.

The windows XP and Debian i386 installations still work fine and I can boot both of them from Grub without issue. I repartitioned the SDA hardrive with PartedMagic 2.0 (Great Utility!!!), and reduced the win Xp partition and removed 2 other FAT32 windows share partitions, in order to install Debian AMD64 on the SDA4 and SDA9 partitions. I can not get GRUB to find the AMD64 install. I have tried:

grub>root (hd0, [+tab key]

and I get:
partition num: 0, filesystem type unknown, partition Type 0x7
partition num: 2, filesystem type ext2fs, partition Type 0x83
partition num: 3, filesystem type ext2fs, partition Type 0x83
partition num: 4, filesystem type FAT, partition Type 0xb
partition num: 5, filesystem type unknown, partition Type 0x82
partition num: 6, filesystem type ext2fs, partition Type 0x83
partition num: 7, filesystem type ext2fs, partition Type 0x83
partition num: 8, filesystem type ext2fs, partition Type 0x83
grub>find /vmlinuz

and only get (hd0,2) as a response ==>SDA3 the i386 install and grub boot partition
I would expect to see (hd0,3) for SDA4 listed as well

I have also tried:

Grub>root (hd0,3)
Grub>kernel / [+tab key]

and I get an error 2: bad file or directory type

I checked all the new partitions and I get an error 2 with the above Grub>root+kernel trick. My old partitions come up fine, listing all files in root directory, but all new partitions give me the same error 2.

I would assume this meant that the partitions or file systems are somehow corrupt. I booted into the i386 installation and mounted /dev/sda4, and was able to read *and* copy all files to one of my other hard drives. Vmlinuz is in the root directory. So it would seem that the data is ok. I have done partition and file system checks from the i386 partition and PartedMagic and have not found any problems.

Looking at the AMD64 root partition SDA4 from my i386 install, I get:
karl2@Cor2Deb:/x64deb/root$ ls -l
total 88
drwxr-xr-x 2 root root 4096 2008-02-18 20:33 bin
drwxr-xr-x 2 root root 4096 2008-02-18 20:33 boot
lrwxrwxrwx 1 root root 11 2008-02-18 20:32 cdrom -> media/cdrom
drwxr-xr-x 4 root root 4096 2008-02-18 20:33 dev
drwxr-xr-x 41 root root 4096 2008-02-18 20:37 etc
drwxr-xr-x 3 root root 4096 2008-02-18 20:36 home
drwxr-xr-x 2 root root 4096 2008-02-18 20:32 initrd
lrwxrwxrwx 1 root root 30 2008-02-18 20:33 initrd.img -> boot/initrd.img-2.6.22-3-amd64
drwxr-xr-x 11 root root 4096 2008-02-18 20:33 lib
lrwxrwxrwx 1 root root 4 2008-02-18 20:32 lib64 -> /lib
drwx------ 2 root root 16384 2008-02-18 15:20 lost+found
drwxr-xr-x 4 root root 4096 2008-02-18 20:32 media
drwxr-xr-x 2 root root 4096 2007-11-19 13:21 mnt
drwxr-xr-x 2 root root 4096 2008-02-18 20:32 opt
drwxr-xr-x 2 root root 4096 2007-11-19 13:21 proc
drwxr-xr-x 3 root root 4096 2008-02-18 20:36 root
drwxr-xr-x 2 root root 4096 2008-02-18 20:36 sbin
drwxr-xr-x 2 root root 4096 2008-02-18 20:32 srv
drwxr-xr-x 2 root root 4096 2008-02-01 13:51 sys
drwxrwxrwt 2 root root 4096 2008-02-18 20:36 tmp
drwxr-xr-x 2 root root 4096 2008-02-18 20:32 usr
drwxr-xr-x 13 root root 4096 2008-02-18 20:32 var
lrwxrwxrwx 1 root root 27 2008-02-18 20:33 vmlinuz -> boot/vmlinuz-2.6.22-3-amd64
Based on my system above I would expect the stanza for the AMD64 install in the grub /boot/grub/menu.lst of the i386 install to read:

title Debian x64, Kernel 2.6.22-3-amd64
root (hd0,3)
kernel /boot/vmlinuz-2.6.22-3-amd64 root=/dev/sda4 ro
initrd /boot/initrd.img-2.6.22-3-amd64

What am I overlooking?

Other notes:
  1. I realize I can chroot an additional installation from within my working i386 system, but what is the fun in that?
  2. I had to run the Etch installer and PartedMagic using the BIOS setting of AHCI so that the SATA drives are recognized. This is also how I installed the working i386 installation. I am now running 2.6.24.2 on my i386 installation, which has a fix for the ICH7 controller on my MB to allow PATA+SATA mode instead of AHCI - see kernel bugzilla #8923. I am not able to see SDA4 in either BIOS mode.
  3. I have also tried to partition and format using the etch installer, with the same results
  4. I have tried SuperGrub, and it too will not recognise the AMD64 installation.
  5. I have spent the last few days reading the Grub man and googling for answers

Other pertenant system info:
Asus P5WDH mother board - ICH7 Family SATA IDE Controller
Intel E6600 Conroe
3x WDC WD3200KS-00P hard drives
2x LITE-ON DVDRW SHM-165H6S

Last edited by kschmitz2; 02-21-2008 at 08:21 PM. Reason: Solved
 
Old 02-19-2008, 09:27 PM   #2
Greenfuse
Member
 
Registered: Nov 2004
Distribution: gentoo, arch centos
Posts: 164

Rep: Reputation: 22
I am not so sure about your partitions as you describe them. I would expect sda4 to be the extended partition, which contains the logical partitions. From your working Debian i386, what is the output of

fdisk -l /dev/sda

You say you can boot into Debian i386 and windows so grub is working and does not need to be reinstalled. You need to edit /boot/grub/menu.lst (on your Debian i386) to include the AMD64 Etch Install. If you can identify the partitions more clearly and determine where Etch is located this should not be difficult.

Last edited by Greenfuse; 02-19-2008 at 09:34 PM.
 
Old 02-20-2008, 03:59 PM   #3
kschmitz2
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Greenfuse View Post
I am not so sure about your partitions as you describe them. I would expect sda4 to be the extended partition, which contains the logical partitions. From your working Debian i386, what is the output of

fdisk -l /dev/sda

You say you can boot into Debian i386 and windows so grub is working and does not need to be reinstalled. You need to edit /boot/grub/menu.lst (on your Debian i386) to include the AMD64 Etch Install. If you can identify the partitions more clearly and determine where Etch is located this should not be difficult.
I agree, but as I said in my post, using the root+kernel trick I was able to determin that grub can not see any files on the new partitions. I have tried to setup the /boot/grub/menu.lst, but get an error, which led me to Google and find the root+kernel method for listing files in the root directory of each partition.

SDA4 is not an extended partition, it is a primary partition, but if I understand the GRUB manual, this should not matter for a Linux disto...

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        8822    70862683+   7  HPFS/NTFS
/dev/sda2            9431       38305   231938437+   f  W95 Ext'd (LBA)
/dev/sda3           38306       38913     4883760   83  Linux
/dev/sda4            8823        9430     4883760   83  Linux
/dev/sda5           20908       24986    32764536    b  W95 FAT32
/dev/sda6           24987       25539     4441941   82  Linux swap / Solaris
/dev/sda7           25540       26755     9767488+  83  Linux
/dev/sda8           26756       38305    92775343+  83  Linux
/dev/sda9            9431       20907    92188939+  83  Linux

Last edited by kschmitz2; 02-20-2008 at 07:48 PM. Reason: Added fdisk -l info
 
Old 02-21-2008, 07:35 AM   #4
Greenfuse
Member
 
Registered: Nov 2004
Distribution: gentoo, arch centos
Posts: 164

Rep: Reputation: 22
Look at the output of fdisk and see where each partition starts and ends. You will see that the numbering is out of sequence. The order in which they are arranged on the disk is as follows

Primary partitions
/dev/sda1 * 1 to 8822
/dev/sda4 8823 to 9430

Extended partition (contains the logical partitions)
/dev/sda2 9431 to 38305

Logical partitions
/dev/sda9 9431 to 20907
/dev/sda5 20908 to 24986
/dev/sda6 24987 to 25539
/dev/sda7 25540 to 26755
/dev/sda8 26756 to 38305
/dev/sda3 38306 to 38913

From your first post it appears that you do not understand the nature of extended and logical partitions. An extended partition is a kind of container which holds logical partitions. I recommend that you learn more about partitions - try here for a start - http://tldp.org/HOWTO/Partition/partition-types.html

I think that the first step in solving your boot problem is to fix your partition naming. Back up important data first.

From Debian i386, use fdisk to make the correction
... # fdisk /dev/sda

then type x at the prompt to enter expert mode
... Command (m for help): x

then type f to fix the naming
... Expert command (m for help): f

Type w to commit the changes to disk.
... Expert command (m for help): w

Once the naming is fixed, work out which partition contain what, then enter the correct information into /etc/fstab and /boot/grub/menu.lst.

Good luck.

Last edited by Greenfuse; 02-21-2008 at 07:41 AM.
 
Old 02-21-2008, 08:18 PM   #5
kschmitz2
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Problem solved!

As I suspected the x64 distro was on the SDA4 partition. I read a few more GRUB guides and tried this (from the i386 installation):

Code:
# grub-install /dev/sda4
(note /dev/sda4 needs to be unmounted)

Then after reboot from the grub command line:

Code:
grub>find /vmlinuz
This returned both linux partitions (0,2) and (0,3), where before it would only return the first one. This indicates that linux root is on SDA3 and SDA4.

For some reason GRUB did not recognize the SDA4 partition until the boot loader was installed in the first sector with the grub install command.

Now I am able to use the stanza I documented in my original post to boot the x64 distro, without issue.

Some useful info for anyone else that is having issues:

GRUB manual
Grub Page - Specifically for dual boot
Ubuntu Forum Post on side by side distros
 
  


Reply

Tags
grub, install, multiple


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic GRUB multiple HD install question Linux31 Linux - Hardware 5 06-25-2007 06:11 PM
Oner last GRUB question on multiple OS install jdestruel Suse/Novell 1 01-02-2007 03:00 PM
How does GRUB work with multiple linux distros ? glenn69 Linux - Newbie 11 10-15-2006 04:12 AM
GRUB - Multiple Linux help brjoon1021 Linux - Newbie 6 01-20-2004 07:08 PM
Why multiple linux options with grub? J.Q. Monkey Linux - Newbie 1 01-12-2004 03:08 PM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration