LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-21-2016, 08:07 AM   #1
DarkVision
Member
 
Registered: Jul 2007
Posts: 199

Rep: Reputation: Disabled
Install Grub2 on -current failed


I just installed latest -current for x86-64 from 2016/05/20 in virtualbox and i get the following error when using grub-install /dev/sda:

Quote:
Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
I enabled debug output with grub-install --debug /dev/sda and i figured out that grub-install fails to detect the correct filesystem using grub-probe:
Code:
grub-probe -t fs /boot/grub
Quote:
grub-probe: error: unknown filesystem.
I did a filesystem check and made sure the filesystem is ext4. This is from dmesg:
Quote:
[ 3.858537] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
This is my /etc/fstab:
Code:
/dev/sda2        swap             swap        defaults         0   0
/dev/sda1        /                ext4        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
And this is the partition table:
Code:
label: dos
label-id: 0x2be168ca
device: /dev/sda
unit: sectors

/dev/sda1 : start=        2048, size=    62914560, type=83, bootable
/dev/sda2 : start=    62916608, size=     4192256, type=82
This worked until a few weeks ago and i have a older virtualbox machine with -current for 32bit and there grub-install works. This is the output from grub-probe on the older install of -current/32bit:

Quote:
ext2
I think this should be OK even if the partition is ext4.

I tried to install latest -current three times to make sure there was no problem during install but grub-install continue to fail.

I tried to downgrade e2fsprogs since that was a recent change but that did not help.

Any ideas what's wrong?

Last edited by DarkVision; 05-21-2016 at 08:14 AM.
 
Old 05-21-2016, 09:20 AM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Are you able to generate a grub.cfg with

Code:
grub-mkconfig -o /boot/grub/grub.cfg
with any success?
 
Old 05-21-2016, 09:46 AM   #3
DarkVision
Member
 
Registered: Jul 2007
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Are you able to generate a grub.cfg with

Code:
grub-mkconfig -o /boot/grub/grub.cfg
with any success?
I will re-install -current again and see if this is possible. Right now i found an old backup of the virtual machine with -current/64bit from 2016/05/04 where i had grub already installed. grub-probe detectes the filesystem as ext2.

I used slackpkg upgrade-all to update to -current as of today, created a new virtual disk with an ext4 filesystem. if i use grub-probe to check that partition it says "unknown filesystem".

If i format the partition with ext2 or ext3 instead of ext4 everything is fine. grub-probe detects the filesystem as "ext2".

Looks like a problem with the new e2fsprogs package. If SETUP is using the same programs from e2fsprogs-1.43 then the ext4 partition may be somehow incompatible with grub.

P.S. Just downgraded to e2fsprogs 1.42.13 and that did not help, i then replaced the mke2fs.conf with the one installed by the 1.42.13 package and then everything is fine again. I compared both configs:

Code:
--- /etc/mke2fs.conf.bad	2016-05-20 18:56:57.000000000 +0200
+++ /etc/mke2fs.conf.new	2016-05-21 16:51:59.000000000 +0200
@@ -11,11 +11,12 @@
 		features = has_journal
 	}
 	ext4 = {
-		features = has_journal,extent,huge_file,flex_bg,64bit,dir_nlink,extra_isize
+		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+		auto_64-bit_support = 1
 		inode_size = 256
 	}
 	ext4dev = {
-		features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
+		features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
 		inode_size = 256
 		options = test_fs=1
 	}
OK, looks like adding 64bit to the mke2fs.conf from 1.42.13 then the ext4-parition will not be detected by grub. I upgraded to e2fsprogs 1.43 and removed 64bit support and then an ext4 partition is detected by grub-probe.

Do we really need 64Bit filesystem support for ext4? Or is there a patch for grub to detect those partitions? If not best thing i can do is to use ext3 when setting up -current since i like to have grub installed.

Fixed: just upgraded to grub 2.02beta3 and everything is fine now even with 64bit support. So i suggest an grub2-update for -current

Last edited by DarkVision; 05-21-2016 at 10:30 AM.
 
1 members found this post helpful.
Old 05-21-2016, 06:01 PM   #4
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Install Grub2 on -current failed

It could be a problem that I am facing while installing last current on a new ssd. Got to test with last grub as you did...
 
Old 05-21-2016, 06:07 PM   #5
DarkVision
Member
 
Registered: Jul 2007
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
It could be a problem that I am facing while installing last current on a new ssd. Got to test with last grub as you did...
You can also try to format the target partition without 64bit support. Therefore you need to "patch" mke2fs.conf before running setup:

Quote:
I just did a reinstall of -current but before running setup to start the install i removed the 64bit option from mke2fs.conf:
Code:
sed -i "s:,64bit::g" /etc/mke2fs.conf
This way setup will format the ext4 partitions without 64bit like the previous version of e2fsprogs did. This fixed my issues with the old version of grub shipped with slackware-current.
But of course grub 2.02beta3 will work also. Still not sure if that 64bit-by-default option is a good idea.
 
Old 05-21-2016, 08:16 PM   #6
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Latest grub works fine. I upgraded my long time 64-14.1 and that installed the latest grub2 and did the the
Code:
grub-mkconfig -o /boot/grub/grub.cfg
and it did everything perfect. I clicked reboot. then selected the vimlinuz-huge even though I still had my old intrid. the it booted fine. Then I made my new intrid.gz. and edited my grub.cfg like I wanted it. So it would select the vmlinuz-generic. No problems on none of my machines.
 
1 members found this post helpful.
Old 05-22-2016, 03:21 AM   #7
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Install Grub2 on -current failed

@Drakeo : what I've understood is that there's a problem while you format in ext4 with the new e2fs which defaults to 64 bits. Then the actual slackware grub will not boot. Your boot partition might have been formatted in 32 bits with previous e2fs utility.
 
Old 05-22-2016, 04:12 AM   #8
DarkVision
Member
 
Registered: Jul 2007
Posts: 199

Original Poster
Rep: Reputation: Disabled
@Tonus: From what i understand is that Drakeo updated to latest grub which is 2.02beta3. That update fixes the 64bit issue for -current but it is good to hear that this update does even work for 14.1. Hopefully grub2-update will not break other things

Last edited by DarkVision; 05-22-2016 at 04:25 AM.
 
Old 05-22-2016, 07:48 AM   #9
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Install Grub2 on -current failed

Missed the 14.1 info, thanks for spotting that.
 
  


Reply



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
[SOLVED] Slackware-current 17-JAN-2016 HP printing failed with "Filter Failed" message. cowlitzron Slackware 5 01-03-2019 11:08 AM
[SOLVED] OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo) enorbet SUSE / openSUSE 9 12-08-2013 04:09 AM
[SOLVED] GRUB2 build errors running slackware64-current (slackware 14) squid890 Slackware 10 07-02-2013 11:23 PM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 08:01 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM

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

All times are GMT -5. The time now is 03:09 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
Open Source Consulting | Domain Registration