This is a discussion on Grub boots from command line but not menu within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, When I try to boot one my slackware partition with grub from the menu, it fails -- I ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, When I try to boot one my slackware partition with grub from the menu, it fails -- I get a "can't mount root filesystem" error. If the same commands are typed into the command line, it works like a champ. Commands are: root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 ro I've got a puppy linux partition on (hd0,1) which boots fine. Any ideas appreciated. -- Andrew Bell andrew.bell.ia@gmail |
| |||
| On Wed, 22 Feb 2006 17:46:27 -0800, andrew.bell.ia wrote: > Hi, > > When I try to boot one my slackware partition with grub from the menu, > it fails -- I get a "can't mount root filesystem" error. If the same > commands are typed into the command line, it works like a champ. > Commands are: > > root (hd1,0) > kernel /boot/vmlinuz root=/dev/hdb1 ro > > I've got a puppy linux partition on (hd0,1) which boots fine. > > Any ideas appreciated. > > -- Andrew Bell > andrew.bell.ia@gmail > One possible answer: A syntax error in menu.lst (or grub.conf). Because you are using two different distro's also check that they expect the same configuration file. Some distros use grub.conf, some use menu.lst. Another possible answer: grub is actually installed on the distro with puppy, but not for slackware. This error might be generated if your configuration marks _its_ root partition to a partition where it has never been installed. Post your configuration file. -- Douglas Mayne |
| |||
| Thanks for your reply. I don't have grub installed on the slackware distro. Does grub need to be installed on each OS that it boots? I *thought* that it went to one location to get its config file and the stage<n> stuff that was needed to boot. I guess that I assumed once the kernel started loading, grub was out of the picture. No? Cheers, |
| |||
| On Thu, 23 Feb 2006 14:20:54 -0800, andrew.bell.ia wrote: > Thanks for your reply. > > I don't have grub installed on the slackware distro. Does grub need to > be installed on each OS that it boots? I *thought* that it went to one > location to get its config file and the stage<n> stuff that was needed > to boot. I guess that I assumed once the kernel started loading, grub > was out of the picture. No? > > Cheers, > Yes, once grub shows its menu it has enough info to load any file on _its_ root partition. There will be no problems if all of the files necessary for booting every linux distribution on your machine are also located on that partition. But, assuming your slackware kernel is on another partition (with the slackware distro), then grub might not be able to load it. This is because grub has the ability to read filesystems, but only as setup. For example, if one distro is using ext2 and another is using reiserFS, then they need separate grub stage2 files. BTW, you didn't post your configuration file. I am trying to help you, but I can't guess every possible mistake you might have made. BTW, you need to improve your posting style. Apparently, you are posting from google groups, and their default setting does not include any context of the thread. This is bad form. Remember, this is Usenet not Google Groups. -- Douglas Mayne |
| |||
| Douglas Mayne wrote: > On Thu, 23 Feb 2006 14:20:54 -0800, andrew.bell.ia wrote: > > > Thanks for your reply. > > > > I don't have grub installed on the slackware distro. Does grub need to > > be installed on each OS that it boots? I *thought* that it went to one > > location to get its config file and the stage<n> stuff that was needed > > to boot. I guess that I assumed once the kernel started loading, grub > > was out of the picture. No? > > > > Cheers, > > > Yes, once grub shows its menu it has enough info to load any file on _its_ > root partition. There will be no problems if all of the files necessary > for booting every linux distribution on your machine are also located on > that partition. But, assuming your slackware kernel is on another > partition (with the slackware distro), then grub might not be able to > load it. This is because grub has the ability to read filesystems, but > only as setup. For example, if one distro is using ext2 and another is > using reiserFS, then they need separate grub stage2 files. In this case, they are using different filesystems, so this could be the culprit, but I still don't understand why the IDENTICAL commands typed from the command line would work and the commands coming from the menu on the puppy filesystem wouldn't work. > BTW, you didn't post your configuration file. I am trying to help you, but > I can't guess every possible mistake you might have made. Thanks again for your insight. I don't think I was at home and had the file available when I wrote. I'm still not at home. If the above idea doesn't fix things, I'll try to grab the file and post it. > BTW, you need to improve your posting style. Apparently, you are > posting from google groups, and their default setting does not include any > context of the thread. This is bad form. Remember, this is Usenet not > Google Groups. I have been using Usenet for a long time, but the Google interface makes it really easy not to pay attention to such things. -- Andrew Bell andrew.bell.ia@gmail.com |
| |||
| On Fri, 24 Feb 2006 06:30:25 -0800, andrew.bell.ia wrote: > Douglas Mayne wrote: >> On Thu, 23 Feb 2006 14:20:54 -0800, andrew.bell.ia wrote: >> >> > Thanks for your reply. >> > >> > I don't have grub installed on the slackware distro. Does grub need to >> > be installed on each OS that it boots? I *thought* that it went to one >> > location to get its config file and the stage<n> stuff that was needed >> > to boot. I guess that I assumed once the kernel started loading, grub >> > was out of the picture. No? >> > >> > Cheers, >> > >> Yes, once grub shows its menu it has enough info to load any file on _its_ >> root partition. There will be no problems if all of the files necessary >> for booting every linux distribution on your machine are also located on >> that partition. But, assuming your slackware kernel is on another >> partition (with the slackware distro), then grub might not be able to >> load it. This is because grub has the ability to read filesystems, but >> only as setup. For example, if one distro is using ext2 and another is >> using reiserFS, then they need separate grub stage2 files. > > In this case, they are using different filesystems, so this could be > the culprit, but I still don't understand why the IDENTICAL commands > typed from the command line would work and the commands coming from the > menu on the puppy filesystem wouldn't work. > <snip> > Here's why I think it could work from the command line, and not the menu. Note: entering WAG mode. Assume your Puppy linux has one boot/root partition formatted ext2. The grub loader is setup properly on that partition. When you boot it proceeds as it should to display the grub menu. As part of the boot to the menu, grub obtains the ability to read ext2 filesystems. It can boot straight away into Puppy, because it's setup properly. Assume your Slackware linux has one boot/root partition formatted ext2. The grub loader has never been setup on the partition, partly because lilo is the default loader for Slackware. When you try to select it from grub's menu, grub assumes it will need to reload the stage2 file necessary to read the type of filesystem on the partition. It fails with the error you are seeing because that partition's BPB has never been initialized with grub's loader (stage2). As soon as you install grub properly on the target partition, the problem disappears. But grub's command line works... When you drop to grub's command line, it doesn't "forget" how to access ext2. It tries to read the disc using whatever tools it has at that moment I wrote about grub and an idea for the layout of multibooting with more than one Linux distribution here: http://groups.google.com/group/comp....d3cfcff0cf2d0f Notice: That link is the start of the thread. -- Douglas Mayne |
| |||
| On Fri, 24 Feb 2006 08:01:16 -0700, Douglas Mayne wrote: > I wrote about grub and an idea for the layout of multibooting with more > than one Linux distribution here: > http://groups.google.com/group/comp....d3cfcff0cf2d0f > > Notice: That link is the start of the thread. I guess that this will have to stop working then, because there is no grub, or lilo installed in the Slackware partition. It's really a shame, as it's worked so well up until now. title Slackware 9.1 - slack partition kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi title Slackware 9.1 - slack partition 2.4.22 kernel (hd0,8)/boot/vmlinuz-adaptec.s-2.4.22 root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi [root@fatman boot]# ls -l total 2752 -rw-r--r-- 1 root root 1404802 Jan 15 2004 vmlinuz -rw-r--r-- 1 root root 1404802 Jan 15 2004 vmlinuz-adaptec.s-2.4.22 [root@fatman boot]# You will note a complete lack of a grub directory, and, obviously, any files therein. No initrd either, as that's the Slack way. title PCLinuxOS kernel (hd0,11)/boot/vmlinuz root=/dev/hda12 devfs=mount hdb=ide-scsi hdd=ide-scsi vga=788 splash=verbose show0pts initrd (hd0,11)/boot/initrd.img If the above had installed a boot loader, it would have been lilo, but this grub stanza does the job instead. Contents of the /boot directory below. [root@fatman boot]# ls -l total 2668 -rw-r--r-- 1 root root 512 Dec 9 2003 boot.0300 -rw-r--r-- 1 root root 512 Dec 13 2003 boot.0800 lrwxrwxrwx 1 root root 24 Dec 18 03:17 config -> config-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 53039 Dec 18 2003 config-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 5032 Jan 4 2004 diag1.img -rw-r--r-- 1 root root 16796 Jan 4 2004 diag2.img -rw-r--r-- 1 root root 180641 Dec 20 2003 initrd-2.4.23-2.tmb.2mdk.img lrwxrwxrwx 1 root root 28 Apr 22 2004 initrd.img -> initrd-2.4.23-2.tmb.2mdk.img lrwxrwxrwx 1 root root 32 Dec 18 03:17 kernel.h -> /boot/kernel.h-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 537 Dec 20 2003 kernel.h-2.4.23-2.tmb.2mdk drwx------ 2 root root 4096 Dec 12 2003 lost+found/ -rw------- 1 root root 251904 Jan 15 2004 map lrwxrwxrwx 1 root root 15 Apr 22 2004 message -> message-graphic -rw-r--r-- 1 root root 183517 Jan 22 2004 message-graphic -rw-r--r-- 1 root root 132 Dec 9 2003 message-text lrwxrwxrwx 1 root root 28 Apr 22 2004 System.map -> System.map-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 617975 Dec 18 2003 System.map-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 256 Dec 9 2003 us.klt lrwxrwxrwx 1 root root 25 Apr 22 2004 vmlinuz -> vmlinuz-2.4.23-2.tmb.2mdk -rw-r--r-- 1 root root 1358399 Dec 18 2003 vmlinuz-2.4.23-2.tmb.2mdk [root@fatman boot]# Lots of extra junk it there, but again no grub directory. Grub needs to be installed exactly once, by one OS. All other additional OS need only have a stanza added to the single menu.lst used by that single installation of grub. If there is a separate boot partition, it will be found in /grub/menu.lst. If there is no boot partition, it will be found in /boot/grub/menu.lst on the partition of the OS from which grub was installed. For Red Hat/Fedora menu.lst will be renamed grub.conf. As you choose to chainload multiple grub installations, I can see why you'd be confused about how grub actually works. I have one grub, on a boot partition, with multiple stanzas for the various OSs, seven at present, and all boot just fine. If OP has the problem that he states, there is most probably a syntax error in the Slackware stanza in his menu.lst. -- imotgm "Lost? Lost? I've never been lost... Been a tad confused for a month or two, but never lost." |
| |||
| On Fri, 24 Feb 2006 21:04:49 +0000, imotgm wrote: > On Fri, 24 Feb 2006 08:01:16 -0700, Douglas Mayne wrote: > > >> I wrote about grub and an idea for the layout of multibooting with more >> than one Linux distribution here: >> http://groups.google.com/group/comp....d3cfcff0cf2d0f >> >> Notice: That link is the start of the thread. > > > I guess that this will have to stop working then, because there is no > grub, or lilo installed in the Slackware partition. It's really a shame, > as it's worked so well up until now. > > title Slackware 9.1 - slack partition > kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi > > title Slackware 9.1 - slack partition 2.4.22 > kernel (hd0,8)/boot/vmlinuz-adaptec.s-2.4.22 root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi > > [root@fatman boot]# ls -l > <snip> > Grub needs to be installed exactly once, by one OS. All other additional > OS need only have a stanza added to the single menu.lst used by that Yes. That's one way to do it! > single installation of grub. If there is a separate boot partition, it > will be found in /grub/menu.lst. If there is no boot partition, it will be > found in /boot/grub/menu.lst on the partition of the OS from which grub > was installed. > > For Red Hat/Fedora menu.lst will be renamed grub.conf. > > As you choose to chainload multiple grub installations, I can see why > you'd be confused about how grub actually works. I have one grub, on a > boot partition, with multiple stanzas for the various OSs, seven at > present, and all boot just fine. If OP has the problem that he states, > there is most probably a syntax error in the Slackware stanza in his > menu.lst. > Note: comment inline. Here we go again. _You_ still want me to diagnose why _your_ system is not broken: http://groups.google.com/group/comp....dbc9715f086943 Your system boots because your kernels are being read from the same boot partition where grub is installed. Re-read this thread and tell me that your system would boot if one kernel was on (hd0,6) formatted XFS and another kernel was to be read from (hd0,7) formatted ext2. Note: I did telegraph that I was entering WAG to the OP due to lack of specific information from him. You have provided more than him, hence, I believe your system is not broken ;-) and should boot. -- Douglas Mayne |
| |||
| On Fri, 24 Feb 2006 14:53:28 -0700, Douglas Mayne wrote: > On Fri, 24 Feb 2006 21:04:49 +0000, imotgm wrote: > >> On Fri, 24 Feb 2006 08:01:16 -0700, Douglas Mayne wrote: >> >> >>> I wrote about grub and an idea for the layout of multibooting with more >>> than one Linux distribution here: >>> http://groups.google.com/group/comp....d3cfcff0cf2d0f >>> >>> Notice: That link is the start of the thread. >> >> >> I guess that this will have to stop working then, because there is no >> grub, or lilo installed in the Slackware partition. It's really a shame, >> as it's worked so well up until now. >> >> title Slackware 9.1 - slack partition >> kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi >> >> title Slackware 9.1 - slack partition 2.4.22 >> kernel (hd0,8)/boot/vmlinuz-adaptec.s-2.4.22 root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi >> >> [root@fatman boot]# ls -l >> > <snip> > >> Grub needs to be installed exactly once, by one OS. All other additional >> OS need only have a stanza added to the single menu.lst used by that > > Yes. That's one way to do it! > >> single installation of grub. If there is a separate boot partition, it >> will be found in /grub/menu.lst. If there is no boot partition, it will be >> found in /boot/grub/menu.lst on the partition of the OS from which grub >> was installed. >> >> For Red Hat/Fedora menu.lst will be renamed grub.conf. >> >> As you choose to chainload multiple grub installations, I can see why >> you'd be confused about how grub actually works. I have one grub, on a >> boot partition, with multiple stanzas for the various OSs, seven at >> present, and all boot just fine. If OP has the problem that he states, >> there is most probably a syntax error in the Slackware stanza in his >> menu.lst. >> > Note: comment inline. > Here we go again. _You_ still want me to diagnose why _your_ system > is not broken: > http://groups.google.com/group/comp....dbc9715f086943 Smartass, I remember that. > Your system boots because your kernels are being read from the same boot > partition where grub is installed. Re-read this thread and tell me that > your system would boot if one kernel was on (hd0,6) formatted XFS and > another kernel was to be read from (hd0,7) formatted ext2. You didn't look closely enough. None of the stanzas I posted are booting from kernels on the boot partition. At the moment, I'm doing housekeeping on the boot partition, and no kernels reside there, at all, only the grub directory, and the files therein. Each kernel is in the /boot directory of the OS's / partition. look again. title Slackware 9.1 - slack partition kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi title Slackware 9.1 - slack partition 2.4.22 kernel (hd0,8)/boot/vmlinuz-adaptec.s-2.4.22 root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi title PCLinuxOS kernel (hd0,11)/boot/vmlinuz root=/dev/hda12 devfs=mount hdb=ide-scsi hdd=ide-scsi vga=788 splash=verbose show0pts initrd (hd0,11)/boot/initrd.img Here are some more. title SUSE LINUX 10.0 root (hd0,5) kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda2 splash=verbose showopts initrd /boot/initrd title SUSE LINUX 9.3 (/dev/hda5) kernel (hd0,4)/boot/vmlinuz root=/dev/hda5 vga=0x317 selinux=0 splash=verbose console=tty0 resume=/dev/hda2 showopts initrd (hd0,4)/boot/initrd title Mandriva 2006 Current kernel (hd1,2)/boot/vmlinuz root=/dev/hdc3 vga=791 resume=/dev/hdc2 splash=verbose initrd (hd1,2)/boot/initrd.img title Mandrake 10.1 -26 ### kernel (hd1,4)/boot/vmlinuz root=/dev/hdc5 resume=/dev/hdc2 splash=verbose vga=788 initrd (hd1,4)/boot/initrd.img I don't use XFS, but having read the stanzas on menu.lst, grub doesn't seem to mind whether the kernels are on ext3, or reiserfs partitions. Try this yourself. I think you'll find that grub is even more flexible than you think. > Note: I did telegraph that I was entering WAG to the OP due to lack of > specific information from him. Always a safe policy. additional information, or post the "smartquestions" link. I may have even resorted to, "WTF are you talking about?" a time or two, for a truly obnoxious, and totally clueless poster, but I try to keep that to a minimum. There are already too many posters that use the latter as their standard reply, to every gnubie poster. I'd rather try to be helpful, if I can, or at least add a little humor, when things get stressed a might. > You have provided more than him, hence, I believe your system is not > broken ;-) and should boot. It's not, and it does. ;-) If you have further comments to this, please don't think me rude if it takes a while to get back. I just bought a 160GB Seagate drive, for $69.95, then ran into a sale that got me a 200GB Seagate for $29.95, so I'm going to be busy moving some OSs over to the bigger drives, deleting some of the older OSs, and installing the 32bit versions of Mandriva 2006, and SUSE 10.0, to run comparisons against the 64bit versions already installed. I'm also building an AMD 64 based computer for a friend, or rather supervising him, while he does the actual building. He's never owned a computer before, and wants it to run Linux, as he likes what he sees on mine, so I'm going to start him on a dual boot Mandriva, SUSE. This should be a trip, and keep me AWOL from the NGs for a while. ;-D Douglas, I do enjoy talking with you, doing a little needling, receiving a little needling back, but always in good humor. Much more pleasant than with some of the more froggy folks one runs into in the NGs. 'Til later. Cheers. ;-) -- imotgm "Lost? Lost? I've never been lost... Been a tad confused for a month or two, but never lost." |
| ||||
| imotgm wrote: > On Fri, 24 Feb 2006 14:53:28 -0700, Douglas Mayne wrote: > > You didn't look closely enough. None of the stanzas I posted are booting > from kernels on the boot partition. At the moment, I'm doing housekeeping > on the boot partition, and no kernels reside there, at all, only the grub > directory, and the files therein. Each kernel is in the /boot directory of > the OS's / partition. look again. > > title Slackware 9.1 - slack partition > kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi > > title Slackware 9.1 - slack partition 2.4.22 > kernel (hd0,8)/boot/vmlinuz-adaptec.s-2.4.22 root=/dev/hda9 vga=788 hdb=ide-scsi hdd=ide-scsi This gave me something to try which worked. Putting the root info on the kernel line as shown above works, but splitting the root and kernel command, as I posted originally, doesn't work. # # Doesn't work # root (hd1,0) kernel /boot/vmlinuz root=/dev/hdb1 ro # # Works # kernel (hd1,0)/boot/vmlinuz root=/dev/hdb1 ro This syntax is not clear from the grub manual. If anyone has any explanation, I'd love to hear it. Thanks! -- Andrew Bell andrew.bell.ia@gmail.com |
| Thread Tools | |
| Display Modes | |
|
|