Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dracut image with squashfs root filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
insane.awmn
n00b
n00b


Joined: 22 Mar 2006
Posts: 24
Location: Athens

PostPosted: Tue Mar 13, 2012 12:04 am    Post subject: dracut image with squashfs root filesystem Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Thu Aug 16, 2012 4:03 am    Post subject: Reply with quote

Spooky weird. I asked the same question exactly one year before you...ok 1 year and few hours: http://forums.gentoo.org/viewtopic-p-6611051.html

And the spookier part is that nobody knows...:-)
Back to top
View user's profile Send private message
XavierMiller
Moderator
Moderator


Joined: 23 Jul 2004
Posts: 5442
Location: ~Brussels - Belgique

PostPosted: Thu Aug 16, 2012 6:54 am    Post subject: Reply with quote

Hello,

Take a look at SystemRescueCD: they boot a Gentoo-based squashed image from CD/USB.
_________________
Xavier Miller
(FR) Merci de respecter les règles du forum.
http://www.xaviermiller.be
Back to top
View user's profile Send private message
insane.awmn
n00b
n00b


Joined: 22 Mar 2006
Posts: 24
Location: Athens

PostPosted: Thu Aug 16, 2012 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Thu Aug 16, 2012 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
insane.awmn
n00b
n00b


Joined: 22 Mar 2006
Posts: 24
Location: Athens

PostPosted: Thu Sep 13, 2012 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Thu Sep 13, 2012 10:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
insane.awmn
n00b
n00b


Joined: 22 Mar 2006
Posts: 24
Location: Athens

PostPosted: Sat Sep 15, 2012 3:40 am    Post subject: Reply with quote

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/
Quote:
#umount ext3

go outside of first LiveOS folder
Quote:
#cd /diskless

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Sat Sep 15, 2012 3:50 am    Post subject: Reply with quote

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
View user's profile Send private message
insane.awmn
n00b
n00b


Joined: 22 Mar 2006
Posts: 24
Location: Athens

PostPosted: Tue Sep 18, 2012 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Wed Sep 19, 2012 2:53 am    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Thu Sep 19, 2013 4:24 am    Post subject: Reply with quote

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
View user's profile Send private message
jjonline
n00b
n00b


Joined: 31 Oct 2013
Posts: 1

PostPosted: Fri Nov 01, 2013 9:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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