View previous topic :: View next topic |
Author |
Message |
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 10:10 am Post subject: Arrg... Messed up grub & partition table. Not again..! |
|
|
Hi, I have a weird problem with my partition table. I recently installed a raid IDE controller card and attached two additional 120GB drives to my system, giving a total of about 360GB. Anyway after installing the card and the drives the Gentoo linux install I had refused to boot... Asssuming that this was because the partition table had now changed, I did my best to try and correct the situation to reflect the new state of affairs. Previously my main partitions had been on /dev/hdc, this was simply because I got the primary and secondary ide channels mixed up, so ineffect, hdc was my secondary master drive. Anyway after adding an IDE PCI Raid controller (I have no intention of using the raid features, I just wanted additional IDE channels) my dev/hdc suddenly switched to being /dev/hdg.
My partition table was divided up into 4 partitions /dev/hdc (now apparently /dev/hdg) was partitioned as 200MB /boot ext3 514MB Swap 31GB / EXT3. and about 80GB NTFS for Windows.
Anyhoo, as far as I understood grub, this meant (when my disc was listed as hdc) that /boot was (hd1,0) / was (hd1,2) and swap well... swap isn't relevant to grub at this point I think.
Anyway now that my partition table had changed to hdg I assumed this meant that /boot was now (hd6,0) and root was now (hd6,2)
In any case I edited Grub accordingly as now follows:
Code: | default 0
timeout 30
splashimage=(hd6,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd6,0)
kernel (hd6,0)/boot/kernel-2.6.0-test6
initrd (hd6,0)/boot/initrd-2.6.0-test6 /root=/dev/discs/disc6/part2 vga=791
# non linux partition
title=Windows XP Professional
root (hd6,3)
chainloader (hd0,3)+1 |
However, despite doing this I still cannot boot gentoo, or Windows for that matter, and the bootloader quits with a message saying /root hdg2 not found (or something similar).
What am I missing? How should grub.conf look if I am to make sure I can boot both Gentoo and windows - and also get my boot splash partition selection image back again?
Any input anybody can offer would be appreciated.
Q
PS,
M'k... I kind of worked it out that, as I have 3 harddisks, the third harddisk should always appear to grub to be (hd2,0) - since it should go in the order (0,0) (0,1) (0,2) and so on...
However since adding the card, there is no longer any directory called /dev/discs which is where grub is looking for some of my partitions above. Instead there appears only to be a reference in /dev to /dev/hda2 /dev/hdc (both NTFS) /dev/hdg1 /dev/hdg2 and /dev/hdg3 which are /boot swap and / respectively. So the whole patition table arrangement has changed - and I am I'm afraid utterly confused. Is there some way i can see my partition table in the same way Gentoo linux sees it? Like some kind of Gui like CFDISK or something, or is there a way to automatically configure grub to find the correct partitions to boot from? |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 10:43 am Post subject: |
|
|
Couple of things ... you say you've got a RAID controller, are you using the drives in a RAID configuration, or just as 3 plain 120 GB units?
AFAIK Grub doesn't work along the lines of hda=hd0, hdb=hd1, so although your first hard drive is now hdg, Grub would still refer to that has hd0. So try changing all the hd6 entries in grub back to hd0, assuming that's still the first drive.
Incidentally (and it's been a while since I set up Linux on a Raid controller, which wasn't actually in a Raid config, just using it as a bare IDE controller), in the ATA section of your kernel config, under "PCI IDE chipset support", there is the option "Boot off-board chipsets first support". IIRC this effectively 'maps' the IDE ports on the PCI raid controller to be hda, hdb, hdc etc., which might be of interest to you. Bear in mind though that this will have no impact on Grub, so my first point would still stand. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Thu Oct 09, 2003 10:53 am Post subject: |
|
|
have you tried grub's tab completion mechanism for selecting the right boot partition?
another suggestion would be to use a grub boot floppy.
thirdly, i understand you installed grub in the mbr and use that as the primary bootloader. an alternative is to use Powerquest's BootMagic and install grub in the /boot partition. this is a safe method which i've been using for quite some time now.
andre. |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 11:15 am Post subject: |
|
|
Hi, thanks for the response. Well firstly I have to say I have no idea how to use Grub's tab complete mechanism. I have heard several people mention it, but am not at all sure what to do to get it to work.
I wish i could see the world the way grub sees it, as this would make things a lot easier.
I have used boot magic some time ago, but it seems to slow boot time down a lot and needs a fat fat partition which under my current arrangement would be rather untidy to do.
I never considered the beneefits of not including grub on my MBR. Would it have helped in a situation such as this?
If it is of help to anyone, grub can find my splash-image.xpm (i'm going by memory here I'm afarid) if i tell it to look for it on (hd0,0), however if I select (0,0) as my boot partition, or (0,2) as my / partition grub says these partitions don't exist.
If anybody can make sense of y partition listing above, or knows how it should look, feel free to let me know. I'm afraid I have possibly made a little bit of a mess of my grub.conf file now by simply searching through all of the options i could think of.. ( (0,0) (0,1) (1,0) ((2,1) and so on...))
As iI said, if I could only just see things the way grub sees them, this would be a lot of help.
Q |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 11:56 am Post subject: |
|
|
Well taking into account that odly since installing my new ide controller card and hard disks that there is no longer a folder in /dev called "discs", I'm not at all sure if it's connected, but setting the bootsplash.xpm image and the boot partition to (hd0,0) allows me to boot past the grub boot screen and start the /boot partition. However it still freaks (kernel panic) when looking for hdc3. The question is, why is it still looking for hdc3? My grub.conf file contains no reference (nor does fstab) to hdc3 any more:
Code: | default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,3)
#kernel (hd0,0)/boot/kernel-2.4.20-gaming-r5 root=/dev/hdg3 vga=791
#initrd (hd0,0)/boot/initrd-2.4.20-gaming-r5
kernel (hd0,0)/boot/kernel-2.6.0-test6
initrd (hd0,0)/boot/initrd-2.6.0-test6 /root=/dev/hdg3 vga=791
# non linux partition
title=Windows XP Professional
root (hd0,3)
chainloader (hd0,3)+1 |
This may be something to do with some weirdness I have experienced before in Gentoo where it sometimes seems to remember configutation settings even after I have changed them. I thought I had fixed that though.. Then again, maybe its something much simpler than that?
Your input is appreciated.
Q |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 12:11 pm Post subject: |
|
|
Have you edited your /etc/fstab to point to the partitions on the PCI controller e.g. hdg etc?
Also, I noticed you've got an initrd line in your grub.conf
You could maybe edit your Gentoo boot lines to look like this:
Code: | title=Gentoo Linux
root (hd0,3)
kernel (hd0,0)/boot/bzImage root=/dev/hdg3 vga=791 |
This assumes you copied your built kernel file bzImage into /boot as per the installation instructions. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 12:25 pm Post subject: |
|
|
No, my fstab file looks exactly like it did before...
Code: | # /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.13 2003/07/17 19:55:18 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/discs/disc0/part1 /boot ext3 noauto,noatime 1 1
/dev/discs/disc0/part3 / ext3 noatime 0 0
/dev/discs/disc0/part2 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults | 0 0
Fstab is not a file I'm very familiar with I'm afraid. From what I can tell it's pointing to /dev/discs and some other eronerous locations (as I said /dev/discs doesn't seem to exist any more). Should I just point it to /dev/hdg1 /hdg3 and so on respectively? Also while I'm at it the two other discs i added are formatted in NTFS. Although I don't use Windows any more, I like the data recovery cababilities of NTFS partitions. (They don't see to gett easily corrupted). How would I add a line to fstab to ensure these discs are automatically mounted at boot time? They are both labeled as NTFS1 and NTFS2.
Q |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 12:32 pm Post subject: |
|
|
Erm as for grub... this is how it looks currently:
Code: | default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,3)
#kernel (hd0,0)/boot/kernel-2.4.20-gaming-r5 root=/dev/hdg3 vga=791
#initrd (hd0,0)/boot/initrd-2.4.20-gaming-r5
kernel (hd0,0)/boot/kernel-2.6.0-test6
initrd (hd0,0)/boot/initrd-2.6.0-test6 /root=/dev/hdg3 vga=791
# non linux partition
title=Windows XP Professional
root (hd0,3)
chainloader (hd0,3)+1 |
I confess I do find the initrd useful, as it takes care of scanning for new hardware etc during boot time and it seems to be pretty effective.
However if you think there is a reason I would be better off without it it is something I would consider doing. it worked fine before I added the card though.
Q |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 12:35 pm Post subject: |
|
|
raid517 wrote: | No, my fstab file looks exactly like it did before...
Code: | # /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.13 2003/07/17 19:55:18 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/discs/disc0/part1 /boot ext3 noauto,noatime 1 1
/dev/discs/disc0/part3 / ext3 noatime 0 0
/dev/discs/disc0/part2 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults | 0 0
Fstab is not a file I'm very familiar with I'm afraid. From what I can tell it's pointing to /dev/discs and some other eronerous locations (as I said /dev/discs doesn't seem to exist any more). Should I just point it to /dev/hdg1 /hdg3 and so on respectively? Also while I'm at it the two other discs i added are formatted in NTFS. Although I don't use Windows any more, I like the data recovery cababilities of NTFS partitions. (They don't see to gett easily corrupted). How would I add a line to fstab to ensure these discs are automatically mounted at boot time? They are both labeled as NTFS1 and NTFS2.
Q |
/etc/fstab should point to entries like /dev/hda1 etc, not /dev/discs/disc0 or whatever. Do a cfdisk /dev/hdg or whatever to find out what partitions are what and modify your /etc/fstab accordingly. Basically, at the moment, it's a mess.
Also, forget about NTFS in Linux. Writing to NTFS partitions in Linux will result in data corruption (and possibly total data loss). The NTFS write support in Linux is alpha at best. Leave well clear. I see you are dual booting with Windows XP. Yo ushould have the Windows XP partition NTFS (obviously), and any partitions where yo uwill want to share data between Linux and WinXP, use Fat32. If you only want to read NTFS partitions in Linux, and never write to them, you might use NTFS but don't blame me if it hoses your NTFS partition. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Thu Oct 09, 2003 4:49 pm Post subject: Grub |
|
|
here's the grub manual: http://www.gnu.org/manual/grub-0.92/html_node/index.html
Further, it seems to me that your grub.conf is in error. Normally, all hd(x,y) references in the Linux section should be the same and point to your /boot partition. The Windows section should contain a different
Finally, I agree with agentjdh that your /etc/fstab should be modified to reflect a proper disc naming scheme. If your first physical (IDE) disk contains 3 partitions, you should call them Code: | /dev/hda1, /dev/hda2, /dev/hda3 | if they're primary partitions. (c)fdisk will tell you the right names.
By the way, you can keep using NTFS from Linux but read-only. I haven't had a single problem with that.
andre. |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 6:08 pm Post subject: |
|
|
Ok, well given your advice, my fstab file now looks as follows. Please let me know if you feel it is correct:
Code: | Modified
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.13 2003/07/17 19:55:18 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdg1 /boot ext3 noauto,noatime 1 1
/dev/hdg3 / ext3 noatime 0 0
/dev/hdg2 none swap sw 0 0
/dev/cddrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults 0 0 |
How is that? is that what you meant?
Q |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 6:14 pm Post subject: Re: Grub |
|
|
Helena wrote: | here's the grub manual: http://www.gnu.org/manual/grub-0.92/html_node/index.html
Further, it seems to me that your grub.conf is in error. Normally, all hd(x,y) references in the Linux section should be the same and point to your /boot partition. The Windows section should contain a different
. |
Can you possibly give me an example of this, what have I done that is different? Sorry i'm a dumbo at partition selection... I'm sure if I get through this I will come out knowing much more about partition selection and how to fix problems.
Your input is appreciated.
Q |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 6:18 pm Post subject: Re: Grub |
|
|
raid517 wrote: | Helena wrote: | here's the grub manual: http://www.gnu.org/manual/grub-0.92/html_node/index.html
Further, it seems to me that your grub.conf is in error. Normally, all hd(x,y) references in the Linux section should be the same and point to your /boot partition. The Windows section should contain a different
. |
Can you possibly give me an example of this, what have I done that is different? Sorry i'm a dumbo at partition selection... I'm sure if I get through this I will come out knowing much more about partition selection and how to fix problems.
Your input is appreciated.
Q |
If your system boots the kernel, you've basically got your grub configuration right. Does Win XP boot from Grub?
Concentrate your efforts on getting your /etc/fstab file sorted out. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
secondshadow Guru
Joined: 23 Jun 2003 Posts: 362
|
Posted: Thu Oct 09, 2003 6:23 pm Post subject: |
|
|
Not that this will help the problem, but if you just wanted the extra IDE channels, why didn't you just get an extra IDE controller. I have an UltraATA 133 controler (Promise chipset...forget whice one though at the moment, maxtor by brand) that I got with my HD (I love Costco, I work there and we get great stuff from time to time, for cheap) and it works just great. I have 3 HD's, a DVD-Burner and a CD-Burner, only one device on the add-on card though as only one really needs the extra speed. |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 6:39 pm Post subject: |
|
|
secondshadow wrote: | Not that this will help the problem, but if you just wanted the extra IDE channels, why didn't you just get an extra IDE controller. I have an UltraATA 133 controler (Promise chipset...forget whice one though at the moment, maxtor by brand) that I got with my HD (I love Costco, I work there and we get great stuff from time to time, for cheap) and it works just great. I have 3 HD's, a DVD-Burner and a CD-Burner, only one device on the add-on card though as only one really needs the extra speed. |
I think he's just using the raid controller in its basic ide controller form, i.e. the drives are not raid-ed up as it were. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 6:46 pm Post subject: |
|
|
Erm... that's what I did do.... It's not just an IDE controller card, but a raid controller card too, based on a Silicon Image chipset, capable of speeds up to 133MBS and inbuilt support for discs larger than 160GB...
Anyway that is kind of besides the point. Like you I only have storage devices attached to it, so no need for raid or anything like that.
Back on topic... I am really genuinely confused now, as with my fstab file now looking as detailed above and my /grub.conf configured thus:
Code: | default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,3)
#kernel (hd0,0)/boot/kernel-2.4.20-gaming-r5 root=/dev/hdg3 vga=791
#initrd (hd0,0)/boot/initrd-2.4.20-gaming-r5
kernel (hd0,0)/boot/kernel-2.6.0-test6
initrd (hd0,0)/boot/initrd-2.6.0-test6 /root=/dev/hdg3 vga=791
# non linux partition
title=Windows XP Professional
root (hd0,3)
chainloader (hd0,3)+1 |
I still get an error message during boot that grub (or the kernel, I'm not sure which) couldn't mount my root device /dev/hdc3... where exatly is it getting this information about /dev/hdc3 from? That was my previous / root partition... But somehow the kernel seems to be remembering this despite there being no reference to anymore anywhere I can find...
Pretty nuts if you ask me...
Q |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Thu Oct 09, 2003 6:57 pm Post subject: Re: Grub |
|
|
raid517 wrote: | Helena wrote: | here's the grub manual: http://www.gnu.org/manual/grub-0.92/html_node/index.html
Further, it seems to me that your grub.conf is in error. Normally, all hd(x,y) references in the Linux section should be the same and point to your /boot partition. The Windows section should contain a different
. |
Can you possibly give me an example of this, what have I done that is different? Sorry i'm a dumbo at partition selection... I'm sure if I get through this I will come out knowing much more about partition selection and how to fix problems.
Your input is appreciated.
Q |
OK here's my grub.conf:
Code: | default 0
timeout 10
splashimage=(hd0,11)/grub/splash.xpm.gz
title=Gentoo 1.4 gentoo-sources r7 (FB)
root (hd0,11)
kernel /kernel-gentoo-2.4.20-r7 root=/dev/hda13 vga=0x31A video=vesa:ywrap,mtrr |
because my /boot partition is a certain logical partition on disk 1, and the / partition is the next one. But then I only have one hard disk...
So this is about finding the right partition names and numbers. Note that (hd0,x) in grub refers to the first hard disk, which normally is hda in Linux. So you can find the correct numbers as follows. Boot grub either from Linux or from a boot floppy. Enter
but do NOT press ENTER. Instead, hit the tab button. Grub will now present you with a list like
Select one of them. After that, enter a comma and your display looks like if you selected hd2. Once more hit the tab key and now you'll be presented with a list of possible partititions, similar to:
Code: | Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x17
Partition num: 1, Filesystem type unknown, partition type 0x17
Partition num: 2, Filesystem type unknown, partition type 0x17
Partition num: 4, Filesystem type is fat, partition type 0xb
Partition num: 5, Filesystem type unknown, partition type 0x7
Partition num: 6, Filesystem type unknown, partition type 0x82
Partition num: 7, Filesystem type is ext2fs, partition type 0x83
Partition num: 8, Filesystem type is ext2fs, partition type 0x83
Partition num: 9, Filesystem type is ext2fs, partition type 0x83
Partition num: 10, Filesystem type unknown, partition type 0xeb
Partition num: 11, Filesystem type is ext2fs, partition type 0x83
Partition num: 12, Filesystem type is ext2fs, partition type 0x83
|
this show my HD layout, with 3 primary partitions (all NTFS) (grub nos 0,1,2)
a logical FAT32-partition (grub no 4, because no 3 is the extended partition which has no data
another NTFS partition (no 5)
a Linux swap partition (no 6, type 0x82)
and several other logical partitions
The important point is that for this Gentoo boot I use partitions 6, 11 and 12 for swap, /boot and /, respectively.
Finally, my /etc/fstab is:
Code: | /dev/hda12 /boot ext3 noatime 1 2
/dev/hda13 / ext3 noatime 0 1
/dev/hda7 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults 0 0
/dev/hda5 /mnt/WinWrite vfat noatime,rw 0 0
/dev/hda6 /mnt/WinRead ntfs noatime,ro 0 0
| The numbers are 1 higher here, because Linux starts with 1 and grub with 0.
Hope this helps.
andre.
Last edited by Helena on Thu Oct 09, 2003 7:15 pm; edited 1 time in total |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 7:00 pm Post subject: |
|
|
raid517 wrote: | Erm... that's what I did do.... It's not just an IDE controller card, but a raid controller card too, based on a Silicon Image chipset, capable of speeds up to 133MBS and inbuilt support for discs larger than 160GB...
Anyway that is kind of besides the point. Like you I only have storage devices attached to it, so no need for raid or anything like that.
Back on topic... I am really genuinely confused now, as with my fstab file now looking as detailed above and my /grub.conf configured thus:
Code: | default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,3)
#kernel (hd0,0)/boot/kernel-2.4.20-gaming-r5 root=/dev/hdg3 vga=791
#initrd (hd0,0)/boot/initrd-2.4.20-gaming-r5
kernel (hd0,0)/boot/kernel-2.6.0-test6
initrd (hd0,0)/boot/initrd-2.6.0-test6 /root=/dev/hdg3 vga=791
# non linux partition
title=Windows XP Professional
root (hd0,3)
chainloader (hd0,3)+1 |
I still get an error message during boot that grub (or the kernel, I'm not sure which) couldn't mount my root device /dev/hdc3... where exatly is it getting this information about /dev/hdc3 from? That was my previous / root partition... But somehow the kernel seems to be remembering this despite there being no reference to anymore anywhere I can find...
Pretty nuts if you ask me...
Q |
I've got a sneaking suspicion it might be that initrd file ... you could do a few things - (1) rebuild the kernel, and copy the new kernel boot images and initrd stuff over your existing ones, and (2) run Grub again
btw, the 'noatime' option don't do anything with ext3 afaik. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Thu Oct 09, 2003 8:57 pm Post subject: |
|
|
Mmm, I think it surely is that initrd line... Here is why. Right... well I used a utility called genkernel to build my kernel... Yeah I know a lot of hardcore gentoo guys don't like it, but I used genkernel --config which allows you to build your kernel exactly the way you like, all it does is automate the make bzImage, modules modules_install part of the process. Which means I can spend some time with my wife, make a cup of coffee, or take the dog for a walk (or whatever) while the process completes. Anyhoo after adding the card I opted to use genkernel again as it had always worked before. I went into make menuconfig and I selected support for Silicon Image PCI IDE chipsets.. Then I shut down menuconfig and let genkernel take care of the rest. However genkernel automatically creates an initrd - but I don't know if the initrd would have been clued up on any changes I made to my hardware or support for a particular chip set. So it seems initrd became comfused and thought 'hey, I'm being run from a setup now which says this is hdc3, so I will set up the PC to boot in this way too. Now the initrd is doggedly refusing to forget the configuration under which it was put together, and insisting on looking on /dev/hdc3 (now non existant) for my /root partition.
The question is, how do I make the initrd 'forget' the current state of affairs and allow me to boot the kernel so that I can build a new one that will recognise the new /root partition?
Any and all input is welcome.
Q |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Thu Oct 09, 2003 9:42 pm Post subject: |
|
|
raid517 wrote: | Mmm, I think it surely is that initrd line... Here is why. Right... well I used a utility called genkernel to build my kernel... Yeah I know a lot of hardcore gentoo guys don't like it, but I used genkernel --config which allows you to build your kernel exactly the way you like, all it does is automate the make bzImage, modules modules_install part of the process. Which means I can spend some time with my wife, make a cup of coffee, or take the dog for a walk (or whatever) while the process completes. Anyhoo after adding the card I opted to use genkernel again as it had always worked before. I went into make menuconfig and I selected support for Silicon Image PCI IDE chipsets.. Then I shut down menuconfig and let genkernel take care of the rest. However genkernel automatically creates an initrd - but I don't know if the initrd would have been clued up on any changes I made to my hardware or support for a particular chip set. So it seems initrd became comfused and thought 'hey, I'm being run from a setup now which says this is hdc3, so I will set up the PC to boot in this way too. Now the initrd is doggedly refusing to forget the configuration under which it was put together, and insisting on looking on /dev/hdc3 (now non existant) for my /root partition.
The question is, how do I make the initrd 'forget' the current state of affairs and allow me to boot the kernel so that I can build a new one that will recognise the new /root partition?
Any and all input is welcome.
Q |
I don't use genkernel myself, but you could go into /usr/src/linux and run which should clear your config and allow you to reconfigure/rebuild using genkernel. Ideally, you should follow the 'proper' method for kernel building, e.g.
make mrproper
make menuconfig
make && make modules_install
cp /usr/src/linux/arch/i386/boot/bzImage /boot
You'll then want to modify your /boot/grub/grub.conf to look for your kernel at hd(whatever)/boot/bzImage, and remove the initrd reference from that file, e.g. my grub.conf for gentoo looks like
title Gentoo
root (hd0,2)
kernel (hd0,2)/boot/bzImage root=/dev/sda3 pci=noacpi
Obviously you'll need to modify that for your config (I'm on scsi here hence /dev/sda) _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
raid517 l33t
Joined: 06 Mar 2003 Posts: 946
|
Posted: Fri Oct 10, 2003 7:11 am Post subject: |
|
|
Ok... welll building a kernel the conventional way isn't a problem for me, I guess i just kind of liked doing everything in a single step -and also the initrd seemed to have a positive effect when looking for new hardware and loading appropriate modules etc...
First though I guess i could try building a new initrd and using genkernel via the live CD. This would at least delete the old one and hopefully make the new one aware of the changed state of affaris.
What worries me is all the messing I have now done with grub and my fstab file (as detailed in my last few posts above). If all it was all along was the initrd causing these problems maybe there was no need to mess with these at all? What impact will having done so have on my install?
Q |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Fri Oct 10, 2003 10:25 am Post subject: |
|
|
raid517 wrote: | Ok... welll building a kernel the conventional way isn't a problem for me, I guess i just kind of liked doing everything in a single step -and also the initrd seemed to have a positive effect when looking for new hardware and loading appropriate modules etc...
First though I guess i could try building a new initrd and using genkernel via the live CD. This would at least delete the old one and hopefully make the new one aware of the changed state of affaris.
What worries me is all the messing I have now done with grub and my fstab file (as detailed in my last few posts above). If all it was all along was the initrd causing these problems maybe there was no need to mess with these at all? What impact will having done so have on my install?
Q |
I _think_ the initrd file copied by genkernel is just /usr/src/linux/System.map, but I've never used an initrd file (always stuck rigidly to the Gentoo installation guide). So after building your kernel by hand you could always copy it to /boot and make reference to /boot/System.map in grub.conf
Personally, I don't have one, and am sceptical of it making any difference to e.g. module detection at boot-up. Check out this page - http://www.dirac.org/linux/system.map/.
As for the messing around with grub/fstab - well, grub wasn't even booting your system before, so messing around with grub in that sense has made some difference - at least your system boots now (does WinXP boot btw?). If you rebuild your kernel with genkernel and/or by hand, and are still having trouble, I'm sure we'll try and help you to sort things out. You should probably have learned quite a bit about partitions, grub and fstab through all of this though, so you might find you can work it out yourself. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|