Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub and ext4 on / [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jan 28, 2011 4:28 pm    Post subject: grub and ext4 on / [SOLVED] Reply with quote

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?
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS


Last edited by bjlockie on Tue Feb 01, 2011 5:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Zanaffar
n00b
n00b


Joined: 22 Sep 2010
Posts: 6

PostPosted: Fri Jan 28, 2011 5:58 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2202

PostPosted: Sat Jan 29, 2011 1:08 pm    Post subject: Gentoo grub supports ext4 Reply with quote

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.
_________________
Greybeard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54817
Location: 56N 3W

PostPosted: Sat Jan 29, 2011 4:43 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 708
Location: Billings, MT, USA

PostPosted: Sun Jan 30, 2011 2:26 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Mon Jan 31, 2011 6:04 pm    Post subject: Reply with quote

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?
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54817
Location: 56N 3W

PostPosted: Mon Jan 31, 2011 9:24 pm    Post subject: Reply with quote

bjlockie,

The kernel should be in /boot

The line in grub.conf
Code:
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)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Tue Feb 01, 2011 5:30 am    Post subject: Reply with quote

NeddySeagoon wrote:
bjlockie,

The kernel should be in /boot

The line in grub.conf
Code:
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)


Thanks for the explanation.
I will convert to ext4 as soon as I get the most recent live cd.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 708
Location: Billings, MT, USA

PostPosted: Tue Feb 01, 2011 5:43 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum