12.2. Testing iso based on Linux Live Kit

Global announcements
Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 01 Nov 2013, 15:33

But how to define what partition to use, if alphaos is installed on two partitions or devices?
I always give the working directory (on sda2) a slightly different name than the boot directory (on SDA1) to avoid that confusion. The copying/naming above was to try and unravel the fat32 question without reformatting the boot partition. Still a bit puzzled by the fat32 hang. I know Scooby is working with it but maybe a quick guide in scripting on how to unpack/edit/repack ithe initrfs.img file for the rest of us?
Thanks,

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 01 Nov 2013, 17:13

Marv wrote:
I know Scooby is working with it but maybe a quick guide in scripting on how to unpack/edit/repack ithe initrfs.img file


unpack initrfs.img with

Code: Select all

xz -dc initrfs.img | cpio -i


I didn't get the packing of initrfs with xz compression correct however it is optional
so you can just do the cpio bit and it works( instead of 1.3MB it becomes 4.5MB )

Code: Select all

find . -print | cpio -o -H newc > /tmp/initrfs.img


Sim can fill in the part with xz compression.
.

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: 12.2. Testing iso based on Linux Live Kit

Postby simargl » 01 Nov 2013, 19:04

This is for compressing initrfs.img

Code: Select all

find . -print | cpio -o -H newc 2>/dev/null | xz -f --extreme --check=crc32 > ../initrfs.img


I made some changes to reduce number of files in /bin and /lib directories,

what's now left in /bin

Code: Select all

[root@alphaos bin]# ls -l
total 1718
lrwxrwxrwx 1 root root      13 Nov  1 17:41 bash -> /usr/bin/bash
-rwxr-xr-x 1 root root 1664088 Oct 13 11:05 busybox
-rwxr-xr-x 1 root root   30480 Oct 13 11:05 chroot
-rwxr-xr-x 1 root root   30344 Oct 31 08:24 gettext
-rwxr-xr-x 1 root root    1585 Oct 31 08:24 gettext.sh
lrwxrwxrwx 1 root root      12 Nov  1 17:41 getty -> /bin/busybox
lrwxrwxrwx 1 root root      12 Nov  1 17:41 init -> /bin/busybox
-rwxr-xr-x 1 root root   30604 Oct 13 11:11 login
lrwxrwxrwx 1 root root      13 Nov  1 17:41 sh -> /usr/bin/bash


and in /lib

Code: Select all

[root@alphaos lib]# ls -l
total 1861
drwxr-xr-x 34 root root    1746 Nov  1 17:41 firmware
-rwxr-xr-x  1 root root  134284 Oct 13 11:07 ld-2.18.so
lrwxrwxrwx  1 root root      10 Sep 24 08:33 ld-linux.so.2 -> ld-2.18.so
-rwxr-xr-x  1 root root 1754580 Oct 13 11:07 libc-2.18.so
-rw-r--r--  1 root root     246 Sep 24 08:32 libc.so
lrwxrwxrwx  1 root root      12 Sep 24 08:33 libc.so.6 -> libc-2.18.so
-rwxr-xr-x  1 root root   13868 Oct 13 11:07 libdl-2.18.so
lrwxrwxrwx  1 root root      10 Sep 24 08:32 libdl.so -> libdl.so.2
lrwxrwxrwx  1 root root      13 Sep 24 08:33 libdl.so.2 -> libdl-2.18.so
drwxr-xr-x  5 root root    1024 Oct 28 17:09 modules
drwxr-xr-x  3 root root     142 Nov  1 09:22 udev


/sbin now links to /usr/bin, instead of /bin - this link was previously added because some wireless modules didn't load on boot, but now modprobe is in /usr/bin.

Also, I deleted /etc/modprobe.d from rootfs with all *.conf files in it.

/bin/init also deleted, now /bin/init is link to busybox

eudev recompiled with files moved to /usr/, except udev rules.d they are fixed to /lib

Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 01 Nov 2013, 19:25

Thanks Scooby and simargl,
I've got the unpacking and packing going. Still puzzling over the fat32 problem. Same usb stick, same syslinux and extlinux.conf. Ext2 format boots perfectly, both find kernel and .img file ok, Fat32 hangs looking for the data files. Following is from live-linux.org
The Live distro created by Linux Live Kit can be installed
on the following filesystems:

* iso9660 (CD) ..... using isolinux
* FAT32 (vfat) ..... using syslinux or extlinux
* ntfs ............. using syslinux or extlinux
* ext2/3/4,btrfs ... using extlinux
* any other fs ..... using lilo

Most users will install on FAT32 for compatibility
with the other operating systems (I mean Windows).

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 01 Nov 2013, 19:48

Found a problem when mounting vfat volumes

In LiveKitLib-->fs_options()

when file system is vfat the following is passed to mount command

Code: Select all

-o check=s,shortname=mixed,iocharset=utf8


But the system doesnt like iocharset=utf8
If I remove it my system boots fine straight off ISO
(posting from it now :D )

Found this from man mount

Code: Select all

iocharset=name
    Character set to use for converting from Unicode to ASCII. The default is to do no conversion.
    Use iocharset=utf8 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in the kernel .config file.


Maybe a recompile of kernel?

Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 01 Nov 2013, 20:38

Scooby wrote:But the system doesnt like iocharset=utf8
If I remove it my system boots fine straight off ISO
(posting from it now :D )


Likewise here, unpacked .img, removed as above, repacked, and both the syslinux fat32 USB drive and the Grub4Dos fat32 SDD partition boot correctly.
Nice finding! Thanks.

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: 12.2. Testing iso based on Linux Live Kit

Postby simargl » 01 Nov 2013, 20:47

Yes, that's great finding Scooby, :)

one thing to mention is that menu.lst on usb (sdb1) must have bootcode from=alphaos.usb (or whatever you named that frugal installation folder)

otherwise it would still boot alphaos from sda6.

---
Script makepfile.sh for making save file is modified to work with bootcode from, so you can have more frugal installation on same partition inside different folders, use bootcode from to specify from which one to boot. Dialog for making save file will recognize what is correct directory to place changes.fs4.

Marv
Proficient
Posts: 81
Joined: 16 May 2013, 16:42

Re: 12.2. Testing iso based on Linux Live Kit

Postby Marv » 01 Nov 2013, 21:20

simargl wrote:Yes, that's great finding Scooby, :)

one thing to mention is that menu.lst on usb (sdb1) must have bootcode from=alphaos.usb (or whatever you named that frugal installation folder)

otherwise it would still boot alphaos from sda6.

---
Script makepfile.sh for making save file is modified to work with bootcode from, so you can have more frugal installation on same partition inside different folders, use bootcode from to specify from which one to boot. Dialog for making save file will recognize what is correct directory to place changes.fs4.


Excellent point worth emphasizing. The from= bootcode really increases the flexibility of installation. I now have it in both menu.lst and extlinux.conf and therefore can rename those boot directories to more descriptive (to me ;) ) names.

Edit: Also checked changes files. In correct place in each instance and test file edits are persistant through reboot both in Grub4Dos and in USB installs.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 01 Nov 2013, 21:26

I boot directly from ISO using grub2

that means my from boot code is

Code: Select all

from=_ISO/MAINMENU/AlphaSlax122.iso


To get savefile working I changed in init to

Code: Select all

save_file_activate "$DATAMNT/$LIVEKITNAME"

My savefile is on USB. Only vfat I got, No ext, My internal HD is ntfs.

The system is very slow!

*edit*
found

Code: Select all

slax.flags=toram


snappier now

But no savefile loaded :cry:
*end edit*




Is bundles copied to ram during start or is it savefile on USB which slows it down?

Is /tmp setup differently? smaller?
Had problem building new alphaslax from it. No space left?
Worked OK in alphaos.

I really miss ntfs support :cry:

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: 12.2. Testing iso based on Linux Live Kit

Postby Scooby » 02 Nov 2013, 10:03

I reread the posts of LinuxLive. I coul've sweared that somewhere it said
no savefile on ntfs?

True or false?


Return to “Announcements”

Who is online

Users browsing this forum: No registered users and 13 guests

cron