# grub and ext4  on / [SOLVED]

## bjlockie

Can I use grub-legacy and ext4 on /?

The ext4 wiki is unclear to me.

It says "root partition" but does it mean /boot has to be supported by grub-legacy?

Or both /boot and / need to be readable by grub-legacy?

----------

## Zanaffar

To answer one of your questions grub can easily run with ext4 under / if its set up right.

While not gentoo specific this wiki page has helped me with grub at times.

https://wiki.archlinux.org/index.php/Grub

----------

## Goverp

The current version of legacy grub in Gentoo contains a patch to support ext4.  I've been using it for a couple of years, no problem.  AFAIR, the grub command line may misreport ext4 partitions as ext2, but that's only reporting.

----------

## NeddySeagoon

bjlockie,

Yes.  Grubs code for file system access is read only.  It reports all extX filesystems as ext2 as it uses the ext2 stage1.5 file for them all.

----------

## Simba7

If you want less of a headache, I'd keep /boot as ext2 and / as ext4. That way, if there's issues, it can be easily remedied.

I do the same using btrfs.. just make sure the filesystem that you use is in your kernel.

----------

## bjlockie

 *Simba7 wrote:*   

> If you want less of a headache, I'd keep /boot as ext2 and / as ext4. That way, if there's issues, it can be easily remedied.
> 
> 

 

My plan is to keep /boot as ext2 and only convert / to ext4.

But a line in grub.cnf specifies where the kernel is (/) and that can be ext4 even though grub can't read it?

----------

## NeddySeagoon

bjlockie,

The kernel should be in /boot

The line in grub.conf  

```
root (hdx,y)
```

tells grub where to find files needed for booting.

It refers to the partition holding those files.  Thats /boot if boot is its own partition or  / if its not.

The statement root=/dev/sd...  is passed to the kernel. It tells the kernel where to find its / (root) filesystem

The two terms root are used i different contexts to mean different things. It confuses people but grub and the kernel will do what they are told.

When you install grub to the MBR, it chooses the stage1.5 file that can read whatever you tell it as root (hdx,y) during the setup.

IF that is the ext2 stage1.5, it can read etc2, ext3 and ext4, so if your (kernels) root fs is ext4,  grub can read both /boot and / (root)

----------

## bjlockie

 *NeddySeagoon wrote:*   

> bjlockie,
> 
> The kernel should be in /boot
> 
> The line in grub.conf  
> ...

 

Thanks for the explanation.

I will convert to ext4 as soon as I get the most recent live cd.

----------

## Simba7

 *bjlockie wrote:*   

> Thanks for the explanation.
> 
> I will convert to ext4 as soon as I get the most recent live cd.

 

You can use the SystemRescueCD. I use it in all of my installs. Just get the latest one (usually the beta) for best results.

----------

