SliTaz SliTaz Forum

You are not logged in.

#1 2014-04-13 17:29:28

tazpider
Member
Registered: 2012-03-20
Posts: 71

Persistent boot disk image

Hello guys,

I need a advice from you.

Paralelly with Slitaz I use some other distributions like Mint. I have prepared disk images which give full persistence without a need of installation on hdd. What I did is:

[c]1 Create empty file using
dd if=/dev/zero of=/media/hda1/mint.disk bs=1M count=10000

2 Format it
mkfs.ext3 /media/hda1/mint.disk

3 Loop mount it
mount -o loop /media/hda1/mint.disk /mnt/mintdisk

4 Loop mount filesystem.squashfs from livecd

5 Copy filesystem from to empty file just created
cp -fpr /rofs/* /mnt/mintdisk

6 Chroot to mintdisk and add new user
useradd -m -s /bin/bash <userName>
passwd <userName>
sudo adduser <userName> sudo

7 Add new entry to grub2
menuentry 'Mint 16 persistent' {
    set isofile='/iso/lm16.disk'
        loopback loop (hd1,3)/$isofile
        set root=(loop)
        linux /vmlinuz root=/dev/sda2 loop=$isofile
        initrd /initrd.lz
}[/c]
Now the question is: can I do the same with Slitaz? I didn't find vmlinuz or initrd in rootfs.gz filesystem, which I guess are necessary to make it working.

Please give me some hints.

Offline

#2 2014-04-13 19:09:54

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Persistent boot disk image

See http://doc.slitaz.org/en:guides:uncommoninst#loop-install

Offline

#3 2014-04-14 17:44:08

tazpider
Member
Registered: 2012-03-20
Posts: 71

Re: Persistent boot disk image

Thanks Bellard.

I read this guide, however I can't figure out how to make the loop file persistent.

How GRUB2 entry should look like to make it working?

Tried this and it's still frugal:

[c]menuentry 'slitaz persistent' {
    set isofile='/iso/slitaz.disk'
        loopback loop (hd1,3)/$isofile
        set root=(loop)
        linux /bzImage root=/dev/sda2 loop=$isofile
        initrd /rootfs.gz
}[/c]

Offline

#4 2014-04-14 18:08:25

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Persistent boot disk image

Use grub2 to loop mount and boot slitaz-preinit.iso

slitaz-preinit.iso will loop mount the file containing the rootfs.

Replace loop=$isofile with [c]loopfs=iso/[/c]formated.file.with.slitaz.rootfs

Reference: http://doc.slitaz.org/en:guides:uncommoninst#loop-install

The partition storing the loopfile (say /dev/hda1) and its path into the partition (say /data/slitaz.fs) is defined by the mount and loopfs arguments:

[c]kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs[/c]

Offline

#5 2014-04-14 18:52:33

tazpider
Member
Registered: 2012-03-20
Posts: 71

Re: Persistent boot disk image

[c]menuentry 'slitaz persistent' {
    loopback loop (hd1,3)/iso/slitaz-4.0-preinit.iso
    kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=/iso/slitaz.disk
}[/c]
Above gives an error:

[c]error: unknown command kernel[/c]

I simply don't understand the syntax of all these lines, it seems to be too much complicated for me smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 8 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]