LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Installing grub on ext4 / non-separate boot (https://www.linuxquestions.org/questions/slackware-14/installing-grub-on-ext4-non-separate-boot-4175417658/)

PrinceCruise 07-19-2012 02:19 PM

Installing grub on ext4 / non-separate boot
 
Hello,

OS - Slackware 13.37 32 bit, both / and /home are ext4.
/boot is not separate.

I'm trying to install Xen from Slackbuilds and it requires either grub or mbootpack for creating Xen compatible kernel with lilo, I chose to go with grub as I've worked on grub so far.
Removed lilo and installed grub legacy from /extra, ran grub-insall /dev/sda which completed successfully -

Quote:

root@pinguslack:/boot# grub-install /dev/sda
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 /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'.

(fd0) /dev/fd0
(hd0) /dev/sda

Now, if I try to run grubconfig, it gives me an error of my /boot FS which is mounted on / is read only and exits.

There's no menu.lst file in /boot/grub yet so I had to uninstall grub and install lilo to get back to work.

I searched and found some hints that grub may not be compatible with both the condition i.e. ext4 FS and non separate /boot. Found a thread which talks about some patch for this, but no further info on that -

Can somebody please confirm if it's really this tricky to install grub on Slackware with ext4 and suggest something useful?

Regards,
-- Prince

slackass 07-19-2012 03:38 PM

Not that tricky at all.
I install grub leg to a separate (small 256mb) ext 3 partition.

kikinovak 07-19-2012 05:15 PM

Quote:

Originally Posted by PrinceCruise (Post 4732980)
Can somebody please confirm if it's really this tricky to install grub on Slackware with ext4 and suggest something useful?

Yes, we can :D

GRUB can't handle ext4. A few years ago, when ext4 came out, the Zenwalk folks immediately adopted it as their default filesystem, with GRUB as default boot manager. Those folks who didn't opt for a separate /boot partition in ext2 or ext3 just had an unbootable system. Easiest solution: make a separate /boot partition, format it in ext2 (no need to have a journaled FS there), give it 30 to 100 MB, and you're good.

Good luck.

whizje 07-19-2012 05:19 PM

Or you can use grub2. But I guess it's simpler to create a separate boot partition.

syg00 07-19-2012 10:48 PM

Quote:

Originally Posted by slackass (Post 4733067)
Not that tricky at all.
I install grub leg to a separate (small 256mb) ext 3 partition.

Interesting. What does the following return ?.
Code:

dumpe2fs -h /dev/<ext3 f/s> | grep -i "^Inode[[:space:]]+size"

slackass 07-19-2012 11:34 PM

Quote:

Originally Posted by syg00 (Post 4733315)
Interesting. What does the following return ?.
Code:

dumpe2fs -h /dev/<ext3 f/s> | grep -i "^Inode[[:space:]]+size"

# dumpe2fs -h /dev/<ext3 f/s> | grep -i "^Inode[[:space:]]+size"
bash: syntax error near unexpected token `|'

syg00 07-19-2012 11:37 PM

Insert your filesystem device name - say /dev/sda3 or whatever.

slackass 07-19-2012 11:51 PM

Quote:

Originally Posted by syg00 (Post 4733338)
Insert your filesystem device name - say /dev/sda3 or whatever.

dumpe2fs -h /dev/sda5 | grep -i "^Inode[[:space:]]+size"
dumpe2fs 1.41.14 (22-Dec-2010)
bash-4.1#

syg00 07-20-2012 04:16 AM

Hmmm - try it with just "inode". I'm just interested in what the size is for your ext3.

PrinceCruise 07-20-2012 05:47 AM

Guys, thanks for bothering and answering. So I'm at loss with the current setup?
Either I'll need to have a separate /boot partition with ext2/3 format or install grub2...? That grub2 thing is nasty I know!
What about any fix for current situation, any patch or the grub version in /extra was the pacthed one for ext4?

Regards.

whizje 07-20-2012 07:14 AM

Quote:

The ext4 patch is included by default with Arch's GRUB package
https://wiki.archlinux.org/index.php...loader_support

kikinovak 07-20-2012 09:42 AM

Just an aside: why not use LILO? I know it's a little bone-headed, but it still does the job well. I'm using it on both servers (RAID5 and all) and desktops alike, and I'm quite happy with it. Of course, beware the Typo(tm).

PrinceCruise 07-20-2012 10:12 AM

Quote:

Originally Posted by kikinovak (Post 4733747)
Just an aside: why not use LILO? I know it's a little bone-headed, but it still does the job well. I'm using it on both servers (RAID5 and all) and desktops alike, and I'm quite happy with it. Of course, beware the Typo(tm).

Got no issues with LILO, works fine. But as per my first post I'm trying to install Xen, which requires grub or using mbootpack to create a lilo compatible Xen kernel.

Regards.

slackass 07-20-2012 12:10 PM

Quote:

Originally Posted by syg00 (Post 4733525)
Hmmm - try it with just "inode". I'm just interested in what the size is for your ext3.

I originally set it up as 256 mg ext3 but I think I should have used ext2. Too much going on on that system to to reformat.

# fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000afda7

Device Boot Start End Blocks Id System
/dev/sda1 * 63 125837144 62918541 7 HPFS/NTFS/exFAT
/dev/sda2 125837145 650118419 262140637+ 7 HPFS/NTFS/exFAT
/dev/sda3 650118420 1174399694 262140637+ 83 Linux
/dev/sda4 1174399695 1465147391 145373848+ 5 Extended
/dev/sda5 1174399758 1175443919 522081 83 Linux <--- grub
/dev/sda6 1175443983 1183829849 4192933+ 82 Linux swap
/dev/sda7 1183829913 1236266009 26218048+ 83 Linux
/dev/sda8 1236266073 1288702169 26218048+ 83 Linux
/dev/sda9 1288702233 1341138329 26218048+ 83 Linux
/dev/sda10 1341138393 1393574489 26218048+ 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aefdb

Device Boot Start End Blocks Id System
/dev/sdb1 63 488375999 244187968+ 83 Linux
/dev/sdb2 488376000 976768064 244196032+ 83 Linux

PrinceCruise 07-24-2012 01:06 PM

UPDATE : Okay, I happened to install Slackware 13.37 on a spare laptop as the only OS. I created a separated /boot partition with ext2 formatting.
Uninstalled lilo, installed grub legacy on MBR following the official README, sample :

http://ftp.gwdg.de/pub/linux/slackwa...37/extra/grub/

Final result was success, still there's no sign of menu.lst or grub.conf in /boot/grub. All I have is just

Quote:

root@pinguslack:/boot/grub# grub
default ffs_stage1_5 reiserfs_stage1_5 vstafs_stage1_5
device.map iso9660_stage1_5 stage1 xfs_stage1_5
e2fs_stage1_5 jfs_stage1_5 stage2
fat_stage1_5 minix_stage1_5 ufs2_stage1_5

Where to proceed next? Anything I missed along way?

Regards.


All times are GMT -5. The time now is 07:29 AM.