LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Partial Success Installing, Grub Error 2 (https://www.linuxquestions.org/questions/slackware-14/partial-success-installing-grub-error-2-a-643342/)

BobNutfield 05-19-2008 04:34 PM

Partial Success Installing, Grub Error 2
 
Hello Everyone,

This one has me stumped. The Slack install on my laptop seemed to go well, I declined to install LILO as I plan on editing my existing Grub Menu.lst. But, I am getting the error:

Code:

Error 2: Bad File or Directory
Now, I am familiar with this message, but it doesn't make sense. vmlinuz-huge-smp-2.6.24.5-smp is located in the boot directory. There is no initrd. My fdisk -l

Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        3824    30716248+  83  Linux
/dev/sda2            3825        6374    20482875  83  Linux
/dev/sda3            6375        6629    2048287+  82  Linux swap / Solaris
/dev/sda4            6630      19457  103040910    5  Extended
/dev/sda5            6630      13156    52428096  83  Linux

My menu.lst entry:

Code:

title            Slackware 12.1
root            (hd0,4)
kernel          /boot/vmlinuz-huge-smp-2.6.24.5-smp root=/dev/sda5 ro

I have Slack installed on /dev/sda5. There is a symbolic link called vmlinuz in the directory as well, but, as you can see I have directed grub to the kernel intself.

Anyone have any idea what I have done in error?

Thanks for any replies.

Bob

titopoquito 05-19-2008 05:07 PM

How did you format your Slackware partition? Ext3? There might be a problem with that, only newer grub installs are able to read the 256 byte inodes from the newer ext3 (upwards compatible with ext4, but not with older grub builds as I said).
I suggest you install the grub package from /extra and reinstall it to your hard disk - you can of course reuse your menu.lst. The Slackware 12.1 version doesn't have this limitation you are experiencing.

BobNutfield 05-19-2008 05:11 PM

Thank you for your reply...

Yes it is ext3, but I am not sure I understand. ALL of the partitions are ext3, including the Ubuntu Hardy I have installed on sda1. The grub installed is the one from the Ubuntu installation and that is the menu.lst I boot from. Never had a problem with ext3 before.

Thanks again

Bob

titopoquito 05-19-2008 05:22 PM

Well, from what I understand the change is quite new. If you search a bit for it ("grub 256 bytes problem" should do) you will find your excact error message.

It's a recent change to ext3 to make shifting to ext4 easier.

PS: You do not have to reformat anything, only install grub again from within Slackware 12.1. Your Ubuntu install should work like it did before after this.

BobNutfield 05-19-2008 05:27 PM

Yes, thank you, I did read that from another post. But this Grub install is less than a month old from a just released distro, it is the newest version of grub. I doubt that this grub installation could be considered old. I guess it could be that I just have corrupt installation. Everything went to plan, so I thought. Didn't see anything unusual in the installation process.

Thanks again

Bob

titopoquito 05-19-2008 05:30 PM

I don't know if Ubuntu patches grub to include the 256 byte inode stuff, but I would normally think so. Dunno why it fails, maybe your Ubuntu is just wayyyyy to old ;)

BobNutfield 05-19-2008 05:40 PM

Well, thank you anyway for your attempt to help. This is the fourth time I have tried to install Slack this year and have never been successful. The first time was on my desktop and got a "Disk 32" error and it would not install. Tried 12.0 on another laptop and it would not load the install disk. This install looked good and I thought I would be booting into Slack this tiime.

I had planned on having a second "stable" distro on this laptop because Hardy just does not perform well and I still get the occassional lock-up/freeze. It's also really odd that after I installed Slack (not having touch the other partitions), Ubuntu now boots without the splash screen, and stutters when it shuts down. It somehow got corrupted during the slack install. Don't know. Looks like me and Slack just weren't made for each other.

Bob

BobNutfield 05-19-2008 06:33 PM

Update with an additional question:

After studying the docs a little more, the README.initrd file indicates that an initrd may be necessary with the ext3 file system. Is it necessary to have an initrd? If so, is it possible to chroot into slack from another OS on the same disk to run the mkinitrd command as suggested in the docs? Or is it just easier to re-install and change the file system to ext2?

Bob

brianL 05-19-2008 06:48 PM

You need an initrd with the generic kernel, not the huge.

syg00 05-19-2008 07:02 PM

Nothing to do with initrd - at this stage anyway.

You can't have the "root" directive if you didn't install grub.
Remove that, and try adding (hd0,4) to the path for the kernel.

BobNutfield 05-19-2008 07:24 PM

OK, that is what I needed to know about initrd.

syg00, I did not install grub during the Slack install, I just edited an existing menu.lst from sda1 where Ubuntu is installed. From the entry I have for Slack above, which root directive should I remove?

root (hd0,4) ?

root=/dev/sda5 ?

I tried this line:

kernel (hd0,4) /boot/vmlinuz root=/dev/sda5

same error.

Thanks for your help, and if you would not mind, post back a sample of what you mean by the root directive.

Many thanks

Bob

syg00 05-19-2008 09:10 PM

root (hd0,4) <<<=== This is a grub directive
It says this is where the grub code lives. Take it out.

root=/dev/sda5 <<<=== This is a kernel parm
Leave it alone.

Quote:

kernel (hd0,4) /boot/vmlinuz root=/dev/sda5
No space ... (hd0,4)/boot/vmlinuz

tommcd 05-19-2008 10:15 PM

BobNutfield,
Just to let you know, I boot Slackware from Ubuntu's grub and it works fine on Slack 12 and Slack 12.1. My Slackware install is ext3 also. So Ubuntu's grub is not the problem. I think syg00 found the problem. Uso no white space in the kernel line except before root=/dev/sda5.

BobNutfield 05-20-2008 02:57 AM

Thanks for all your replies. I tried all of the suggestions and still get the same error 2 from grub. This has me stymied because I use the same grub entries to boot five different distros from one grub menu.lst on my desktop, and three years ago I used to boot Slack with the same type of entry (still had a copy of the old menu.lst).

brianL: Thank you for the suggestion, but this laptop is a dual core AMDX2 T57. The Slack docs say to use the huge.smp kernel to get the support for this processor. None-the-less, I chrooted into Slack from Ubuntu and attempted to run the mkinitrd command (from the instructions in the docs), but got a permission denied error and a /proc/partitions No such file or directory.

I can only conclude that the files in boot directory are corrupt. I cannot see anything wrong, but then these are binaries that you can't really look at.

tommcd: If you would not mind, could you post your entry from Ubuntu's menu.lst to boot Slack? I just want to verify that I am getting right.

I am going to try to re-install one more time. If it doesn't work, I guess I can scratch Slackware from my list of possibles.

Thanks again

Bob

tommcd 05-20-2008 03:41 AM

Quote:

Originally Posted by BobNutfield (Post 3158826)
tommcd: If you would not mind, could you post your entry from Ubuntu's menu.lst to boot Slack? I just want to verify that I am getting right.

Bob

I'm at work now, on a Windows machine. When I get home I'll post the Slackware entry from my menu.lst in Ubuntu. Expect it in about 4 hours (or maybe a bit less) from the time of this post.

I'm not sure about this, but I think you need these 2 lines in the menu.lst file
Code:

savedefault
boot

This goes after the kernel and initrd line, but you don't need a initrd for the huge-smp kernel. Also, see post #4 from this thread about using grub interactively to automafically boot any distro. It always works for me.
http://ubuntuforums.org/showthread.php?t=393379
Your menu.lst entry looks ok to me though:


All times are GMT -5. The time now is 09:39 AM.