View previous topic :: View next topic |
Author |
Message |
FastTurtle Guru
Joined: 03 Sep 2002 Posts: 477 Location: Flakey Shake & Bake Caliornia, USA
|
Posted: Thu Apr 18, 2013 3:09 pm Post subject: Initramfs Questions |
|
|
1st:
the Initramfs guide shows using --disklabel for fstab. Is this an option passed to genkernel?
2nd:
What about using a ramdisk setup like a live-cd for the / fs instead of a drive? How would that be done?
Links and/or docs appreciated for both |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Thu Apr 18, 2013 10:40 pm Post subject: |
|
|
Assuming this is the initramfs guide: http://en.gentoo-wiki.com/wiki/Initramfs
1. No, /etc/fstab has nothing to do with the kernel. mount(8) or busybox or other userspace applications deals with /etc/fstab.
2. Usually for livecd there's a squashfs or some other filesystem-on-file to boot off of it. An initramfs can be used to mount this file-on-filesystem via loopback. You just need to get it mounted and treat it like any other root filesystem. Creating this filesystem has its own issues because it needs to be read-only... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
FastTurtle Guru
Joined: 03 Sep 2002 Posts: 477 Location: Flakey Shake & Bake Caliornia, USA
|
Posted: Fri Apr 19, 2013 1:39 pm Post subject: |
|
|
eccerrOr:
1) Just tested the --disklabel option and yes it is a genkernel flag. This is per the Gentoo USB Guide, not the wiki page.
What I think it does is tells genkernel to use the disklabel instead of /dev/(h/s)d# and configures the init scripts to look by-label instead. This is similar to how a live-cd searches for the cdrom before it finishes booting and exactly what I need for a USB flash drive. Can't ensure the flash drive will be mounted the same way on every system that can boot it.
2) Theoretical right now but of future interest for either a live-cd or USB project.
Looking at this, it means a 3rd partition would be needed for a Live-USB version for /home.
Although the squash/cram fs would mean a bit more work, it's just about perfect from a Live-USB point of view as the OS itself can't be borked by the user. They may screw the boot up (not likely as they're usuallys not mounted). The only issue is a damaged flash drive - wear leveling pushes it to read-only mode.
The only problem I see is setting up the squash/cram fs to exclude /home while ensuring it can use all of the unused space on the drive. That's either going to be some crazy partitioning or possibly place the squash/cram into the boot partition (might be advisable as with either of them, you know exactly how large they are (Do you need /boot mounted then?) Have to think about that. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Fri Apr 19, 2013 3:33 pm Post subject: |
|
|
Ah, I have actually never used genkernel, as it does create initramfs it can use it.
But anyway it's not absolutely necessary to use cramfs/squashfs for the system - it mostly allows more storage on the limited medium like a cdrom. But if you don't care about density, even an ext4fs on a file will work too (and can be mounted RO). It's using the "rest of the space" that can be tricky. For a livecd the main problem is that the media is read-only and there's no official place to put writable data (tmpfs or union?) but on a usb stick, there are more possibilities - you could just use that ext4 and keep home in the container, or just symlink home to a directory on the USB drive.
Did you still want the media to be readable by another OS is the question... I was tempted to build one with the whole drive ext3, as there's no need for another OS to read/write the USB stick... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
|