LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2020, 12:16 AM   #31
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 138

Original Poster
Rep: Reputation: 10

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.



Quote:
mount /dev/sda6 /mnt

chroot /mnt

sudo grub-install --root-directory=/mnt /dev/sda6
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

umount /mnt
I rebooted...

Quote:
mount /dev/sda6 /mnt

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.
 
Old 04-04-2020, 01:16 AM   #32
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,129

Rep: Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801Reputation: 4801
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"

You can find your uuid using lsblk -o +uuid
 
1 members found this post helpful.
Old 04-04-2020, 07:35 AM   #33
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,431

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
This is all wrong
Quote:
mount /dev/sda6 /mnt

chroot /mnt

sudo grub-install --root-directory=/mnt /dev/sda6
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

umount /mnt
should have been after booting in efi mode.
Code:
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.
 
1 members found this post helpful.
Old 04-04-2020, 08:51 AM   #34
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
Quote:
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.
 
1 members found this post helpful.
Old 04-04-2020, 04:48 PM   #35
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 138

Original Poster
Rep: Reputation: 10
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.
 
Old 04-04-2020, 05:50 PM   #36
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,431

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
Your welcome
 
Old 04-05-2020, 01:03 AM   #37
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,698

Rep: Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800Reputation: 4800
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.
 
Old 04-05-2020, 01:41 AM   #38
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 2,846

Rep: Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929Reputation: 2929
Quote:
Originally Posted by pan64 View Post
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.

Last edited by enorbet; 04-15-2020 at 12:30 PM.
 
Old 04-13-2020, 09:32 PM   #39
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,916

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by Gordie View Post
This is good advice if you use grub to boot your computer. For those of us that use lilo the Super Grub Disk will not work
Update grub shows this entry:
Found ELILO Boot Manager on /dev/sda2@/EFI/elilo.efi/elilo.efi

and using the "e" edit option with the SuperGrub disk I get this:

Click image for larger version

Name:	GrubLilo.jpg
Views:	25
Size:	56.5 KB
ID:	32976

Last edited by 2damncommon; 04-13-2020 at 09:34 PM.
 
Old 04-15-2020, 11:09 PM   #40
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 138

Original Poster
Rep: Reputation: 10
@2damncommon that's interesting. I don't have ELILO. I would have thought GRUB2 and ELILO would be incompatible.
 
  


Reply

Tags
e2fsck, grub rescue


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Even in remotest Africa, Windows 10 nagware ruins your day: Update burns satellite link cash LXer Syndicated Linux News 2 06-04-2016 02:20 PM
dropline-installer ruins KDE sythe Slackware 40 08-13-2007 06:27 AM
Opensuse 10.2 ruins reiserfs suguru SUSE / openSUSE 7 05-22-2007 08:24 AM
DVD Burner Ruins Data DVD natewlew Linux - Software 8 03-29-2006 02:29 PM
Logging in as root ruins my sound card configuration Penguin of Wonder Slackware 13 09-26-2005 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration