View previous topic :: View next topic |
Author |
Message |
insane.awmn n00b
Joined: 22 Mar 2006 Posts: 24 Location: Athens
|
Posted: Tue Mar 13, 2012 12:04 am Post subject: dracut image with squashfs root filesystem |
|
|
Hello everyone ,
I want to use plymooth so i want to boot my squashfs image with the dracut generated image,i tried some kerne boot l args but with no success .
The dracut ebuild has the module dmsquash-live but i cant find any documentation .
Can anyone help ? _________________ Elpizw o Theos na sas xarizei eutixia................... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Thu Aug 16, 2012 6:54 am Post subject: |
|
|
Hello,
Take a look at SystemRescueCD: they boot a Gentoo-based squashed image from CD/USB. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
insane.awmn n00b
Joined: 22 Mar 2006 Posts: 24 Location: Athens
|
Posted: Thu Aug 16, 2012 2:23 pm Post subject: |
|
|
i am booting with a squashfs image with the genkernel ,but i want to try dracut to take advantage the plymooth plugin.
I had try SystemRescueCD before ,and i think that use the genkernel scripts to mount the squashfs image. _________________ Elpizw o Theos na sas xarizei eutixia................... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Thu Aug 16, 2012 3:56 pm Post subject: |
|
|
insane.awmn wrote: | i am booting with a squashfs image with the genkernel ,but i want to try dracut to take advantage the plymooth plugin.
I had try SystemRescueCD before ,and i think that use the genkernel scripts to mount the squashfs image. | Same exact situation here. genkernel has quirks which are irritating. |
|
Back to top |
|
|
insane.awmn n00b
Joined: 22 Mar 2006 Posts: 24 Location: Athens
|
Posted: Thu Sep 13, 2012 8:37 pm Post subject: |
|
|
hello everyone ,
i tested a lot with dracut and finally, i got dracut to boot with the gentoo based squashfs image.
I will get all the infos and i will post where my example for everyone who interesting. _________________ Elpizw o Theos na sas xarizei eutixia................... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Thu Sep 13, 2012 10:52 pm Post subject: |
|
|
insane.awmn wrote: | hello everyone ,
i tested a lot with dracut and finally, i got dracut to boot with the gentoo based squashfs image.
I will get all the infos and i will post where my example for everyone who interesting. | That would be awesome! Thanks! |
|
Back to top |
|
|
insane.awmn n00b
Joined: 22 Mar 2006 Posts: 24 Location: Athens
|
Posted: Sat Sep 15, 2012 3:40 am Post subject: |
|
|
i emerge dracut with DRACUT_MODULES="plymouth dmsquash-live dm lvm" and USE flags="device-mapper "
and inside the chrooted system i run
Quote: | #dracut -m "base lvm kernel-modules" -a "dmsquash-live" --filesystems "squashfs" -f |
This is ganerate the initramfs in /boot
We must have a kernel with lvm support and the LVM kernel extension to permit snapshotting
outside of chrooted enviroment.
we have the directory /diskless/squashfs (contains the rootfs)
we make a folder name LiveOS indside of a folder LiveOS
Quote: | #mkdir-p /diskless/LiveOS/LiveOS |
then go to the directory LiveOS/LiveOS
Quote: | #cd /diskless/LiveOS/LiveOS |
we create an EXT3 image
Quote: |
#dd if=/dev/zero of=ext3fs.img bs=1M count=4096
#mkfs.ext3 ext3fs.img
|
we create a directory to mount the ext3fs.img
Quote: |
#mkdir -p /diskless/ext3
|
[quote]mount the ext3fs.img to directory
Quote: | #cd /diskless
mount LiveOS/LiveOS/ext3fs.img ext3/
|
and then we copy the contents of squashfs-root to ext3 folder
Quote: | #rsync -avHx squashfs/ --exclude='usr/src/*' ext3 |
umount the ext3fs.img of ext3/
go outside of first LiveOS folder
make squashfs image
Quote: | #mksquashfs LiveOS/ squashfs.img |
I assume that we have a usb stick formated with fat32 ,and the label of that is " LABEL=live" ,with installed grub or grub2 (personaly i use grub2 with EFI,)
in the /boot folder of usb, we put the initramfs image generated by dracut ,and the kernel for the squashfs-root
the grub kernel command is like that: Quote: | /boot/vmlinux-3.3.8-gentoo root=live:LABEL=live ro rd.live.image |
Also you can use UUID=aaaa-bbbb instead LABEL="label of usb"
At the usb stick we create the directory /LiveOS and we copy there the squashfs.img
lets assume that the usb is mounted at /mnt/usb
Quote: | #mkdir /mnt/usb/LiveOS
# cp /diskless/squashfs.img /mnt/usb/LiveOS |
if you want to take the advantage of plymouth ,just add in the kernel command the splash or rhgb
Quote: | /boot/vmlinux-3.3.8-gentoo root=live:LABEL=live ro rd.live.image splash |
devsk am waiting your results , i am facing problems with the plymouth (only when is enabled in kernel cmd ) at the shutdown-reboot ,i think that something go wrong with the plymouth-openrc-plugin
(and sorry for my poor english....) _________________ Elpizw o Theos na sas xarizei eutixia................... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Sep 15, 2012 3:50 am Post subject: |
|
|
So, the module dmsquash-live uses "LiveOS" for the directory at the USB top level and looks for squashfs.img inside to use as root file system? |
|
Back to top |
|
|
insane.awmn n00b
Joined: 22 Mar 2006 Posts: 24 Location: Athens
|
Posted: Tue Sep 18, 2012 2:51 pm Post subject: |
|
|
sorry for my late answer ....
yes...uses the LiveOS directory ,and the squashfs.img is a squashed ext3 image. Do you try it ? _________________ Elpizw o Theos na sas xarizei eutixia................... |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Wed Sep 19, 2012 2:53 am Post subject: |
|
|
insane.awmn wrote: | sorry for my late answer ....
yes...uses the LiveOS directory ,and the squashfs.img is a squashed ext3 image. Do you try it ? | Not yet. I am busy with office work at this time and my genkernel setup is working fine across three machines I have (all three boot with the same squashfs image). I will be able to spend time on this in my next upgrade cycle. But thanks so much for posting the step by step guide. I appreciate it. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Thu Sep 19, 2013 4:24 am Post subject: |
|
|
Gets more spooky. 1 year to the date of the last post I made, I still haven't tried this yet. I think its time I do. |
|
Back to top |
|
|
jjonline n00b
Joined: 31 Oct 2013 Posts: 1
|
Posted: Fri Nov 01, 2013 9:28 am Post subject: |
|
|
I make and use livecd to boot,I meet same problem,i get the error of "empty or no root= argument".when i use root= such as root=/dev/sr0,then i can see the plymouth work,but dracut sent me a error of "/dev/mappper/live-rw not found",i google a lot,and i think maybe it is a problem of device-mapper or fstab?
I will focus on this.at last,please forgive my poor english.
2013/11/16
today i tried it again,i thought it is a problem about the dracut initramfs don't know how to switch to new root in squashfs image,maybe no squashfs module,but i gen it with dm-squashfs option,and it wasn't work,i will try it again. |
|
Back to top |
|
|
|