Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1) don't think it's a problem. We're trying to install to the first sector of the hard drive, not the first sector of hda5. hda5 would need to be bootable if the only boot loader available was the first sector of hda5.
2) no idea...
Let me look at the script some more to see about the pkgdatadir thing. It might require a quick edit.
Tried that waaaay back at the beginning. Tried it again, just to make sure:
root@ttyp1[knoppix]# chroot /mnt/hda5
[root@Knoppix /]# grub-install --recheck /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
/dev/hda: Not found or not a block device.
[root@Knoppix /]#
I was suggesting that he not chroot because if he does (and if his system uses udev), then there won't be a /dev/hda5 device file because the udev daemon is not available. That could be causing the problem. Essentially, I'm trying to get the grub-install script to use the Knoppix device files for IO access, but force it to use only the files located on hda5.
If the non-chroot route is still something worth trying, then execute this command:
Code:
sed -i.backup 's@pkgdatadir=.\+@pkgdatadir=/mnt/hda5/boot/grub@' /mnt/hda5/sbin/grub-install
Note, this will actually change the script, but it will create a backup in the same directory. If you give this a try, and it doesn't work, then replace the modified one with the backup.
Okay, just so you're aware, my grub is located in /mnt/hda5/boot/grub and my grub-install is in /mnt/hda5/sbin . I assume your patch will still work. I'm trying it now.
Yeah, sorry, the command would need to be changed to reflect that. I'll go back and edit it. I honestly just had a mental lapse and forgot the /boot part.
Using my slightly altered version of your instructions:
root@ttyp2[knoppix]# sed -i.backup 's@pkgdatadir=.\+@pkgdatadir=/mnt/hda5/boot/grub@' /mnt/hda5/sbin/grub-install
root@ttyp2[knoppix]# grep "pkgdatadir=" /mnt/hda5/sbin/grub-install
pkgdatadir=/mnt/hda5/boot/grub
root@ttyp2[knoppix]# /mnt/hda5/sbin/grub-install --recheck --root-directory=/mnt/hda5 /dev/hda
cp: cannot stat `/mnt/hda5/boot/grub/stage1': No such file or directory
I went to go look at the grub-install script, and they did something I don't agree with... The script deletes the files in the grub installation directory, before it copies them over. If you give me a minute or two, I can have my web server post the stage files you need (unless you have them elsewhere on your system). I have the same version of grub, so the files will be fine to copy over.
Also, do a
Code:
find /mnt/hda5 -type f -name "stage1"
You probably still have them on your system in a share directory. That directory is what pkgdatadir should have been.
Last edited by Dark_Helmet; 01-27-2005 at 08:07 PM.
root@ttyp2[/]# /mnt/hda5/sbin/grub-install --recheck --root-directory=/mnt/hda5 /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /mnt/hda5/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.