SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I used the LiveSlak usb edition. I edited /etc/fstab. Now
/dev/sda8 is swap
/dev/sda7 is ntfs-3g to share data between Win10 and -current
/dev/sda6 is /
/dev/sda5 is /winre ( / was here and displaced with a windows rescue partition)
/dev/sda4 is Windows 10
/dev/sda2 is /boot/efi, formatted as vfat
Next, I had to fix GRUB2. I looked at several different sources for help and tried a couple different commands, since nothing was working for me.
sudo grub-install --root-directory=/mnt /dev/sda
Installing for i386-pc platform.
/proc/devices: fopen failed: No such file or directory
device mode not found
[... repeats this line several times ...]
/proc/devices: fopen failed: No such file or directory
device mode not found
/proc/devices: fopen failed: No such file or directory
device mode not found
grub-install: warning: this GPT partition label contains no BIOS Boot Partition;
embedding won't be possible.
grub-install: warning: Enbedding is not possible. GRUB can only be installed in
this setup by using blocklists. However, blocklists are UNRELIABLE and their
usage is discouraged...
grub-install: error: will not proceed with blocklists.
I tried
Quote:
sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg
Generating grub configuration file ...
/proc/devices: fopen failed: No such file or directory
device mode not found [repeats this line several times]
...
Found linux image: /boot/vmlinuz-huge
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmliuz-generic-4.19.75
[...finds a few more images...]
grep: /proc/mounts: No such file or directory
Cannot find list of partitions! (Try mounting /sys.)
done
I'm not sure what the right approach is for GRUB2. It seemed like the first try, with chroot, was close. I just don't know how to point to the /dev/sda2 for GRUB2.
Did you regenerate your initrd to have the correct root device? It might be easier to use UUID for that. You can run /usr/share/mkinitrd/mkinitrd_command_generator.sh to give you the output, then you'd change the -r /dev/sda6 to -r "UUID=your-uuid-for-/dev/sda6"
mount /dev/sda6 /mnt
mount /dev/sda2 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run
chroot /mnt
grub-install --target=x86_64-efi
grub-mkconfig -o /boot/grub/grub.cfg
exit
Then umount everything and reboot.
With slackware What I usually do is edit the /boot/grub/grub.cfg after running grub_mkconfig to use the vmlinuz-generic/initrd.gz as my first boot entry and add other boot options I deem necessary and don't never run it again.
Last edited by colorpurple21859; 04-04-2020 at 08:04 AM.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition
grub-install: error: cannot find EFI directory
The output above is what you posted in post 31 and indicates you are trying to do a Legacy install of Grub on a GPT/EFI system. That won't work. You need to point to the correct EFI partition as suggested in post 32. I would expect that suggestion to work but if that still fails, you need to run blkid and compare the UUID for sda6 to what you have in the grub.cfg file.
colorpurple21859, I thank you for showing me the correct commands for mounting everything inside of the LiveSlak environment. I was able to update GRUB2. Now it works and I can access the Slackware partition again from the normal GRUB2 boot menu. I used your post and RadicalDreamer's several suggestions to change fstab over to UUID.
I have to still update mkinitrd as suggested, but since I haven't changed my kernel, I guess it's not something that needs to be done right away. I did run the script and redirected output to a text file so I can look at it and see if I have questions.
I learned a lot from the help everyone provided in this thread. Thanks to everyone that participated.
Just one additional comment: Probably better to give the full disk to windows and put any other OS onto another one. In this case Windows will not harm anything but itself.
Just one additional comment: Probably better to give the full disk to windows and put any other OS onto another one. In this case Windows will not harm anything but itself.
Well... almost. The problem OP experienced couldn't occur again but it isn't completely true that Windows won't mess with another OpSys just because they are on a separate drive. Recently MS is a bit less aggressive about destroying the competition it discovers on one's drives. There are still a few minor gotchas these days but there is no guarantee they won't go back to old ways or even worse, now that they offer a sort of alternative to Linux within windows, actually step up the fight. Be wary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.