SliTaz SliTaz Forum

You are not logged in.

#1 2015-07-29 17:25:24

az_ua
Moderator
Registered: 2014-05-02
Posts: 284

/init patch (fix tazusb writefs & tazlito writeiso issues)

http://people.slitaz.org/~az_ua/init

http://paste.slitaz.org/?7b97fca1f601f8d0#sV0A/vqPTzkcnFiQ01AO3hNFOQMzFnR+6E96WtcOQkc=

--- /init

+++ /init

@@ -226,8 +226,10 @@

r=$root

root=90%

got rootfssize

[c]-[/c] [ $(busybox free|busybox awk '/Mem:/{print int(($4*100)/$3)}') -ge $r ] &&

[c]-[/c]       busybox mount -t tmpfs -o size=$root tmpfs /mnt &&

[c]+[/c]

+       inodes=$(grep MemFree /proc/meminfo | awk '{print $2/3}' | cut -d. -f1)

+      busybox mount -t tmpfs -o size=$root,nr_inodes=$inodes tmpfs /mnt &&

+

for i in $(ls -ar /); do

        case "$i" in

        .*|cdrom)       ;;

[attachment=38821,1977]

Offline

#2 2015-08-01 06:22:14

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

sed: unsupported command |

root@slitaz:~# cat /proc/cmdline

mount=/dev/sda3 loopfs=slitaz.fs

root@slitaz:~# head -4 /var/log/boot.log

Mount /dev/sda3...

sed: unsupported command |

Into file slitaz.fs...

                                                                     [ Done ]

root@slitaz:~# grep -A 13 'mnt()' /init

mnt()

{

r=$(blkid 2> /dev/null | sed "s|\"||g;|$root|!d;s|:.*||;q")

r=${r:-$root}

r=${r#/dev/}

r=/dev/${r%%/*}

d=${root#*$r}

busybox mount $r $1 && return

w=$(cat /sys/module/usb_storage/parameters/delay_use)

w=$((1+${w:-2}))

echo -n "Sleep $w seconds..."

sleep $w

busybox mount $r $1

}

Offline

#3 2015-08-01 08:50:10

az_ua
Moderator
Registered: 2014-05-02
Posts: 284

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

@alanyih

> sed: unsupported command |

[c]

--- init

+++ init

@@ -92 +92 @@

-r=$(blkid 2> /dev/null | sed "s|\"||g;|$root|!d;s|:.*||;q")

+r=$(blkid 2> /dev/null | sed "s|\"||g;/$root/!d;s|:.*||;q")

[/c]

But I still cannot access this repo.

pushing to http://hg.slitaz.org/slitaz-boot-scripts...authorization failed

Offline

#4 2015-08-01 12:40:00

az_ua
Moderator
Registered: 2014-05-02
Posts: 284

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

slitaz-boot-scripts 405 sed still broken

Thanks, Aleksej, I just read your mail - yes, it will not work

and we need to change / to \/ in $root value before:

something, like this:

[c]newvariable=$(echo $root | sed 's|/|\\/|g') [/c]&&

sed "/$newvariable/!d"

instead of

sed "/$root/!d"

Offline

#5 2015-08-02 08:08:51

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

Loop install

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

Boot setup

[..]

title SliTaz cooking in loop file

  map (hd0,0)/boot/slitaz-cooking.iso (hd1)

  map --hook

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

  initrd (hd1)/boot/rootfs.gz

title SliTaz cooking in RAM (like the Live CD)

  map (hd0,0)/boot/slitaz-cooking.iso (hd1)

  map --hook

  kernel (hd1)/boot/bzImage rw root=/dev/null autologin

  initrd (hd1)/boot/rootfs.gz

Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:

title SliTaz cooking

  map (hd0,0)/boot/slitaz-preinit.iso (hd1)

  map --hook

  kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs

  initrd (hd1)/boot/rootfs.gz

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

tmpfs: Bad value '90%' for mount option 'nr_inodes'

1.

root@slitaz:~# cat /proc/cmdline

mount=b9f5cf75-b3a0-4c86-bd48-3933094a7551 loopfs=slitaz.fs

2.

root@slitaz:~# head -11 /var/log/boot.log

Mount b9f5cf75-b3a0-4c86-bd48-3933094a7551...

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Sleep 2 seconds...mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Into file slitaz.fs...

losetup: /mnt/slitaz.fs: No such file or directory

Switching / to tmpfs...

mount: mounting tmpfs on /mnt failed: Invalid argument

                                                                     [ Skipped ]

Loading module: squashfs

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

3.

root@slitaz:~# grep tmpfs /var/log/dmesg.log

tmpfs: Bad value '90%' for mount option 'nr_inodes'

4.

root@slitaz:~# blkid | grep sdb

/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

5.

root@slitaz:~# grep -A 7 'mnt()' /init

mnt()

{

r=$(blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | tr / .)/!d;s|:.*||;q")

r=${r:-$root}

r=${r#/dev/}

r=/dev/${r%%/*}

d=${root#*$r}

6.

root@slitaz:~# grep -A 4 rootfsinodes /init

got rootfsinodes && inodes=$root

root=90%

got rootfssize

[ $(busybox free|busybox awk '/Mem:/{print int(($4*100)/$3)}') -ge $r ] &&

    busybox mount -t tmpfs -o size=$root,nr_inodes=$inodes tmpfs /mnt &&

root@slitaz:~#

Offline

#6 2015-08-02 08:24:51

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:

mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory

tmpfs: Bad value '90%' for mount option 'nr_inodes'

root@slitaz:~# cat /proc/cmdline

mount=slitaz-318 loopfs=slitaz.fs

root@slitaz:~# head -12 /var/log/boot.log

Mount slitaz-318...

mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory

Sleep 2 seconds...mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory

Into file slitaz.fs...

losetup: /mnt/slitaz.fs: No such file or directory

Switching / to tmpfs...

mount: mounting tmpfs on /mnt failed: Invalid argument

                                                                     [ Skipped ]

Loading module: squashfs

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

root@slitaz:~# grep tmpfs /var/log/dmesg.log

tmpfs: Bad value '90%' for mount option 'nr_inodes'

root@slitaz:~# blkid | grep sdb

/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

root@slitaz:~# df -h

Filesystem                Size      Used Available Use% Mounted on

tmpfs                     3.6G    212.0K      3.6G   0% /run

devtmpfs                  3.6G         0      3.6G   0% /dev

tmpfs                     3.6G         0      3.6G   0% /dev/shm

tmpfs                     3.6G         0      3.6G   0% /var/lock

root@slitaz:~# mount

rootfs on / type rootfs (rw,relatime)

tmpfs on /run type tmpfs (rw,relatime)

proc on /proc type proc (rw,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=3798496k,nr_inodes=949624,mode=755)

sysfs on /sys type sysfs (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)

tmpfs on /dev/shm type tmpfs (rw,relatime)

tmpfs on /var/lock type tmpfs (rw,relatime)

usbfs on /proc/bus/usb type usbfs (rw,relatime)

root@slitaz:~# grep -A 13 'mnt()' /init

mnt()

{

r=$(blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | tr / .)/!d;s|:.*||;q")

r=${r:-$root}

r=${r#/dev/}

r=/dev/${r%%/*}

d=${root#*$r}

busybox mount $r $1 && return

w=$(cat /sys/module/usb_storage/parameters/delay_use)

w=$((1+${w:-2}))

echo -n "Sleep $w seconds..."

sleep $w

busybox mount $r $1

}

root@slitaz:~# grep -A 4 rootfsinodes /init

got rootfsinodes && inodes=$root

root=90%

got rootfssize

[ $(busybox free|busybox awk '/Mem:/{print int(($4*100)/$3)}') -ge $r ] &&

    busybox mount -t tmpfs -o size=$root,nr_inodes=$inodes tmpfs /mnt &&

root@slitaz:~#

Offline

#7 2015-08-02 13:00:23

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

root@slitaz:~$

Attachments

    [png] qemu-b-a.png

Please check PS1

Offline

#8 2015-08-10 11:37:51

K3nn3th
Member
Registered: 2014-09-13
Posts: 194

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

has this been added to the repo version?

im still encountering the gzip issues.

Offline

#9 2015-08-13 02:04:20

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

slitaz-rolling-preinit.iso    2015-Aug-09

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

/bin/sh: tazpkg: not found

1.

root@slitaz:~$ cat /proc/cmdline

mount=b9f5cf75-b3a0-4c86-bd48-3933094a7551 loopfs=slitaz.fs

2.

root@slitaz:~$ grep slitaz /var/lib/tazpkg/installed.md5

370f8b89f84bdea6d148dcde164794af  slitaz-base-files-282.tazpkg

d217df7d7f46042afd4d54879170c53d  slitaz-boot-scripts-408.tazpkg

3.

root@slitaz:~$ head -28 /var/log/boot.log

$root:

Mount b9f5cf75-b3a0-4c86-bd48-3933094a7551...

r=$(blkid|sed):

${r:-$root}: b9f5cf75-b3a0-4c86-bd48-3933094a7551

${r#/dev/}: b9f5cf75-b3a0-4c86-bd48-3933094a7551

{/dev/$(r%%/*)}: /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551

${root#*$r}: b9f5cf75-b3a0-4c86-bd48-3933094a7551

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Sleep 2 seconds...

$r : /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Into file slitaz.fs...

losetup: /mnt/slitaz.fs: No such file or directory

Switching / to tmpfs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

4.

root@slitaz:~$ diff /init-orig /init

--- /init-orig

+++ /init

@@ -89,18 +89,26 @@

got $1 && msg "$1 $root"

}

+echo -e "\$root: $root\n"

+

mnt()

{

r=$(blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | tr / .)/!d;s|:.*||;q")

+echo -e "\nr=\$(blkid|sed): $r\n"

r=${r:-$root}

+echo -e "\${r:-\$root}: $r\n"

r=${r#/dev/}

+echo -e "\${r#/dev/}: $r\n"

r=/dev/${r%%/*}

+echo -e "{/dev/\$(r%%/*)}: $r\n"

d=${root#*$r}

+echo -e "\${root#*\$r}: $d\n"

busybox mount $r $1 && return

w=$(cat /sys/module/usb_storage/parameters/delay_use)

w=$((1+${w:-2}))

echo -n "Sleep $w seconds..."

sleep $w

+echo -e "\n\$r : $r\n"

busybox mount $r $1

}

5.

root@slitaz:~$ tazpkg

/bin/sh: tazpkg: not found

root@slitaz:~$ ls -l /usr/bin/taz*

ls: /usr/bin/taz*: No such file or directory

Offline

#10 2015-08-13 04:24:17

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

root@slitaz:~$

root@slitaz:~$ grep Red -A 2 /etc/profile

    # Red and blue for root

    PS1="\[\e[1;31m\]\u@\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\\$ "

    #PS1='\u@\h:\w\$ '

root@slitaz:~$ . /etc/profile

root@slitaz:~#

[attachment=38915,1989]

Offline

#11 2015-08-13 09:07:11

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

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

What is the output of:

# blkid | grep b9f5cf75-b3a0-4c86-bd48-3933094a7551

# blkid

Offline

#12 2015-08-14 01:26:03

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

http://forum.slitaz.org/topic/init-patch-fix-tazusb-writefs-tazlito-writeiso-issues#post-38844

4.

root@slitaz:~# blkid | grep sdb

/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

root@slitaz:~# blkid | grep b9f5cf75-b3a0-4c86-bd48-3933094a7551

/dev/disk/by-uuid/b9f5cf75-b3a0-4c86-bd48-3933094a7551: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

Offline

#13 2015-08-17 00:52:27

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

[attachment=38925,1994]

1. slitaz-rolling-preinit.iso    2015-Aug-16

root@slitaz:~# grep slitaz-boot /var/lib/tazpkg/installed.md5

b43d9dd85ec1a41643a47d4856096a4c  slitaz-boot-scripts-409.tazpkg

2. blkid: sda and sdb

root@slitaz:~# blkid

/dev/loop0: UUID="3bff2dfa-99d7-4e18-850e-3701b2ec017e" TYPE="ext3" PTTYPE="dos"

/dev/sda1: LABEL="win" UUID="000534FA0002617A" TYPE="ntfs" PARTUUID="329e43ff-01"

/dev/sda2: LABEL="rolling" UUID="e9594d18-8d01-4cf3-9e9c-bdcf9ca64060" TYPE="ext3" PARTUUID="329e43ff-02"

/dev/sda3: LABEL="slitaz-ff" UUID="724023ae-b6a9-4b54-9cd8-2b76a510a463" TYPE="ext4" PARTUUID="329e43ff-03"

[..]

/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"

root@slitaz:~# dmesg | grep -A 7 SanDisk

scsi 8:0:0:0: Direct-Access     SanDisk  Cruzer Switch    1.26 PQ: 0 ANSI: 5

sd 8:0:0:0: Attached scsi generic sg1 type 0

sd 8:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)

sd 8:0:0:0: [sdb] Write Protect is off

sd 8:0:0:0: [sdb] Mode Sense: 43 00 00 00

sd 8:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

sdb: sdb1

sd 8:0:0:0: [sdb] Attached SCSI removable disk

3. mount=/dev/sda3...

root@slitaz:~# cat /proc/cmdline

mount=/dev/sda3 loopfs=slitaz.fs

root@slitaz:~# head -7 /var/log/boot.log

Mount /dev/sda3...

Into file slitaz.fs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

root@slitaz:~# df -h

Filesystem                Size      Used Available Use% Mounted on

tmpfs                     3.6G    232.0K      3.6G   0% /run

/dev/sda3               484.2M    112.9M    346.4M  25% /mnt

/dev/loop0              484.2M    112.9M    346.4M  25% /

devtmpfs                  3.6G         0      3.6G   0% /dev

tmpfs                     3.6G         0      3.6G   0% /dev/shm

tmpfs                     3.6G         0      3.6G   0% /var/lock

root@slitaz:~# mount

tmpfs on /run type tmpfs (rw,relatime)

/dev/loop0 on / type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

proc on /proc type proc (rw,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=3798508k,nr_inodes=949627,mode=755)

sysfs on /sys type sysfs (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)

tmpfs on /dev/shm type tmpfs (rw,relatime)

tmpfs on /var/lock type tmpfs (rw,relatime)

usbfs on /proc/bus/usb type usbfs (rw,relatime)

root@slitaz:~#

4. Mount /dev/sda3 (slitaz-ff)...

root@slitaz:~# cat /proc/cmdline

mount=slitaz-ff loopfs=slitaz.fs

root@slitaz:~# head -7 /var/log/boot.log

Mount /dev/sda3 (slitaz-ff)...

Into file slitaz.fs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

root@slitaz:~# df -h | head -4

Filesystem                Size      Used Available Use% Mounted on

tmpfs                     3.6G    228.0K      3.6G   0% /run

/dev/sda3               484.2M    112.8M    346.4M  25% /mnt

/dev/loop0              484.2M    112.8M    346.4M  25% /

root@slitaz:~# mount | head -2

tmpfs on /run type tmpfs (rw,relatime)

/dev/loop0 on / type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

5. Mount /dev/sda3 (724023ae-b6a9-4b54-9cd8-2b76a510a463)...

root@slitaz:~# cat /proc/cmdline

mount=724023ae-b6a9-4b54-9cd8-2b76a510a463 loopfs=slitaz.fs

root@slitaz:~# head -7 /var/log/boot.log

Mount /dev/sda3 (724023ae-b6a9-4b54-9cd8-2b76a510a463)...

Into file slitaz.fs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

root@slitaz:~# df -h | head -4

Filesystem                Size      Used Available Use% Mounted on

tmpfs                     3.6G    228.0K      3.6G   0% /run

/dev/sda3               484.2M    112.8M    346.4M  25% /mnt

/dev/loop0              484.2M    112.8M    346.4M  25% /

root@slitaz:~# mount | head -2

tmpfs on /run type tmpfs (rw,relatime)

/dev/loop0 on / type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

root@slitaz:~#

6. Mount /dev/sdb1...

root@slitaz:~# cat /proc/cmdline

mount=/dev/sdb1 loopfs=slitaz.fs

root@slitaz:~# head -8 /var/log/boot.log

Mount /dev/sdb1...

mount: mounting /dev/sdb1 on /mnt failed: No such device or address

Sleep 2 seconds...Into file slitaz.fs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

root@slitaz:~# df -h

Filesystem                Size      Used Available Use% Mounted on

tmpfs                     3.6G    240.0K      3.6G   0% /run

/dev/sdb1               484.2M    112.9M    346.4M  25% /mnt

/dev/loop0              484.2M    112.9M    346.4M  25% /

devtmpfs                  3.6G         0      3.6G   0% /dev

tmpfs                     3.6G         0      3.6G   0% /dev/shm

tmpfs                     3.6G         0      3.6G   0% /var/lock

root@slitaz:~# mount

tmpfs on /run type tmpfs (rw,relatime)

/dev/loop0 on / type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

proc on /proc type proc (rw,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=3798504k,nr_inodes=949626,mode=755)

sysfs on /sys type sysfs (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)

tmpfs on /dev/shm type tmpfs (rw,relatime)

tmpfs on /var/lock type tmpfs (rw,relatime)

usbfs on /proc/bus/usb type usbfs (rw,relatime)

7. Mount slitaz-318...

root@slitaz:~$ cat /proc/cmdline

mount=slitaz-318 loopfs=slitaz.fs

root@slitaz:~$ head -11 /var/log/boot.log

Mount slitaz-318...

mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory

Sleep 2 seconds...mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory

Into file slitaz.fs...

losetup: /mnt/slitaz.fs: No such file or directory

Switching / to tmpfs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

8. Mount b9f5cf75-b3a0-4c86-bd48-3933094a7551...

root@slitaz:~$ cat /proc/cmdline

mount=b9f5cf75-b3a0-4c86-bd48-3933094a7551 loopfs=slitaz.fs

root@slitaz:~$ head -11 /var/log/boot.log

Mount b9f5cf75-b3a0-4c86-bd48-3933094a7551...

mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Sleep 2 seconds...mount: mounting /dev/b9f5cf75-b3a0-4c86-bd48-3933094a7551 on /mnt failed: No such file or directory

Into file slitaz.fs...

losetup: /mnt/slitaz.fs: No such file or directory

Switching / to tmpfs...

                                                                     [ Done ]

Processing: /etc/init.d/rcS...

Mounting proc filesystem on /proc                                    [ Done ]

Mounting devtmpfs filesystem on: /dev                                [ Done ]

Starting udev daemon...

root@slitaz:~$

Offline

#14 2015-08-17 06:42:41

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

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

Try this:

1-

cat > /init.blkid <<EOT

#!/bin/sh

cp -a /init /init.patched

sed -i 's/got modprobe/busybox blkid\n&/' /init.patched

exec /init.patched

EOT

2- Reboot with init=/init.blkid in cmdline

3- See the top of /var/log/boot.log

You may need a kernel module to see sdb. In this case, append modprobe=themodule in cmdline

(or modprobe=module1,module2 ...)

4- lsmod

Offline

#15 2015-08-17 12:49:32

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: /init patch (fix tazusb writefs & tazlito writeiso issues)

You may need a kernel module to see sdb. In this case, append modprobe=themodule in cmdline

Let's look at "mount=/dev/sdb1 loopfs=slitaz.fs"

It works fine.

6. Mount /dev/sdb1...

root@slitaz:~# cat /proc/cmdline

mount=/dev/sdb1 loopfs=slitaz.fs

root@slitaz:~# head -8 /var/log/boot.log

Mount /dev/sdb1...

mount: mounting /dev/sdb1 on /mnt failed: No such device or address

Sleep 2 seconds...Into file slitaz.fs...

[ Done ]

root@slitaz:~# df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 3.6G 240.0K 3.6G 0% /run

/dev/sdb1 484.2M 112.9M 346.4M 25% /mnt

/dev/loop0 484.2M 112.9M 346.4M 25% /

root@slitaz:~# mount

tmpfs on /run type tmpfs (rw,relatime)

/dev/loop0 on / type ext3 (rw,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 7 queries executed - Memory usage: 1.6 MiB (Peak: 1.77 MiB) ]