Extracted XZM modules on USB disk

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
mrme01
White ninja
White ninja
Posts: 5
Joined: 26 Aug 2015, 20:42
Distribution: Debian usually
Location: United Kingdom

Extracted XZM modules on USB disk

Post#1 by mrme01 » 26 Aug 2015, 20:57

Hi folks,

I'm trying to tinker with the internals of the OS, specifically KDE and Xorg for a project I'm looking into. As this is the easiest OS to get to boot from a FAT32 partition, I would like to know where I would put the extracted folders on the USB drive (external hard disk, not flash).

In essence, I would like to boot Porteus from USB without the use of modules. I assume I will need to edit a script somewhere as well, that information would also be useful.

Thanks in advance :D

neko
DEV Team
DEV Team
Posts: 956
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: Extracted XZM modules on USB disk

Post#2 by neko » 26 Aug 2015, 22:14

This is one sample.

My PC is UEFI boot PC.
It has the Hard Disk storage (HD) connected via USB3 and SATA.
The HD has a FAT32 UEFI boot partition (/dev/sda1) and an EXT3 partition (/dev/sda4).
PC boot device first order is set to this HD UEFI.
A kernel updated Porteus ISO is set in the EXT3 partition.

/EFI/boot/grub.cfg on /dev/sda1

Code: Select all

#
set prefix=/EFI/boot/
set default="0"
if loadfont $prefix/unicode.pf2; then
  set gfxmode=auto
  insmod efi_gop
  insmod efi_uga
  insmod gfxterm
  terminal_output gfxterm
fi
set timeout="30"
set hidden_timeout_quiet=false

if background_image $prefix/img_1006.png; then
  set color_normal=black/black
  set menu_color_highlight=white/light-gray
else
  set color_normal=cyan/blue
  set color_highlight=white/blue
fi

#
# /dev/sda4: UUID=8e01ee07-6834-4c28-9fbc-961c414e45c0
#
menuentry "FVWM_ja-kernel.v3.18.20-i486-1.iso" {
search --no-floppy --fs-uuid --set=root 8e01ee07-6834-4c28-9fbc-961c414e45c0
set ISO="/porteus/3.4.0/FVWM_ja-kernel.v3.18.20-i486-1.iso"
loopback loop $ISO
linux (loop)/boot/syslinux/vmlinuz from=/$ISO \
extramod=UUID:8e01ee07-6834-4c28-9fbc-961c414e45c0/live/porteus/persist/home/guest/extramod/32/auspersis \
 retry "load=_ja" copy2ram rammod=00  kmap=jp     
initrd (loop)/boot/syslinux/initrd.xz
}

mrme01
White ninja
White ninja
Posts: 5
Joined: 26 Aug 2015, 20:42
Distribution: Debian usually
Location: United Kingdom

Re: Extracted XZM modules on USB disk

Post#3 by mrme01 » 26 Aug 2015, 22:28

neko wrote:This is one sample.

My PC is UEFI boot PC.
It has the Hard Disk storage (HD) connected via USB3 and SATA.
The HD has a FAT32 UEFI boot partition (/dev/sda1) and an EXT3 partition (/dev/sda4).
PC boot device first order is set to this HD UEFI.
A kernel updated Porteus ISO is set in the EXT3 partition.

/EFI/boot/grub.cfg on /dev/sda1

Code: Select all

#
set prefix=/EFI/boot/
set default="0"
if loadfont $prefix/unicode.pf2; then
  set gfxmode=auto
  insmod efi_gop
  insmod efi_uga
  insmod gfxterm
  terminal_output gfxterm
fi
set timeout="30"
set hidden_timeout_quiet=false

if background_image $prefix/img_1006.png; then
  set color_normal=black/black
  set menu_color_highlight=white/light-gray
else
  set color_normal=cyan/blue
  set color_highlight=white/blue
fi

#
# /dev/sda4: UUID=8e01ee07-6834-4c28-9fbc-961c414e45c0
#
menuentry "FVWM_ja-kernel.v3.18.20-i486-1.iso" {
search --no-floppy --fs-uuid --set=root 8e01ee07-6834-4c28-9fbc-961c414e45c0
set ISO="/porteus/3.4.0/FVWM_ja-kernel.v3.18.20-i486-1.iso"
loopback loop $ISO
linux (loop)/boot/syslinux/vmlinuz from=/$ISO \
extramod=UUID:8e01ee07-6834-4c28-9fbc-961c414e45c0/live/porteus/persist/home/guest/extramod/32/auspersis \
 retry "load=_ja" copy2ram rammod=00  kmap=jp     
initrd (loop)/boot/syslinux/initrd.xz
}
This is an older HP laptop, with a BIOS. I don't own anything more current with an EFI, will this work?

This also mentions the use of EXT, I want to run it from FAT32.

neko
DEV Team
DEV Team
Posts: 956
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: Extracted XZM modules on USB disk

Post#4 by neko » 26 Aug 2015, 22:56

If your PC has a enough size FAT32 (/dev/sda1),
you expand a Porteus ISO in the root of /dev/sda1,
and then set the boot loader 'syslinux' at the /dev/sda1.
You may set a directory for extramod in the /dev/sda1.
You may set a persistence data in the /dev/sda1 too.

/boot/syslinux/porteus.cfg on /dev/sda1

Code: Select all

LABEL example
MENU LABEL example
KERNEL vmlinuz
APPEND initrd=initrd.xz copy2ram rammod=00 extramod=/extramodDIR
TEXT HELP
	For example
	You set the directory /extramodDIR in /dev/sda1
	The derectory has extra modules.
ENDTEXT

mrme01
White ninja
White ninja
Posts: 5
Joined: 26 Aug 2015, 20:42
Distribution: Debian usually
Location: United Kingdom

Re: Extracted XZM modules on USB disk

Post#5 by mrme01 » 27 Aug 2015, 04:46

neko wrote:If your PC has a enough size FAT32 (/dev/sda1),
you expand a Porteus ISO in the root of /dev/sda1,
and then set the boot loader 'syslinux' at the /dev/sda1.
You may set a directory for extramod in the /dev/sda1.
You may set a persistence data in the /dev/sda1 too.

/boot/syslinux/porteus.cfg on /dev/sda1

Code: Select all

LABEL example
MENU LABEL example
KERNEL vmlinuz
APPEND initrd=initrd.xz copy2ram rammod=00 extramod=/extramodDIR
TEXT HELP
	For example
	You set the directory /extramodDIR in /dev/sda1
	The derectory has extra modules.
ENDTEXT
I'm not sure if I can upload images here, but I get this error http://i.imgur.com/RH1xV9W.png.

I'll have a play with it later to see if I can understand what's wrong, but if there's a reply before I get back to this then that would be awesome :D

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 961
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

Re: Extracted XZM modules on USB disk

Post#6 by ncmprhnsbl » 27 Aug 2015, 05:34

In essence, I would like to boot Porteus from USB without the use of modules.
linux needs a POSIX compatible filesystem to run from (for file ownership and permissions)
fat (and ntfs) dont support these
porteus modules are compressed filesystems, in effect mini partitions
which allows it to boot from non-POSIX compatible partitions(fat)
so porteus modules need to be extracted to an EXT partition if you want to customize them (un/install apps change configs etc)
(if you have plenty of ram, this can be done live in /tmp for example )
then recompress them with 'dir2xzm' or the 'Build Porteus Module' rightclick option
there are some forum threads addressing the idea of running porteus like a 'normal' system...
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

mrme01
White ninja
White ninja
Posts: 5
Joined: 26 Aug 2015, 20:42
Distribution: Debian usually
Location: United Kingdom

Re: Extracted XZM modules on USB disk

Post#7 by mrme01 » 27 Aug 2015, 06:01

ncmprhnsbl wrote:
In essence, I would like to boot Porteus from USB without the use of modules.
linux needs a POSIX compatible filesystem to run from (for file ownership and permissions)
fat (and ntfs) dont support these
porteus modules are compressed filesystems, in effect mini partitions
which allows it to boot from non-POSIX compatible partitions(fat)
so porteus modules need to be extracted to an EXT partition if you want to customize them (un/install apps change configs etc)
(if you have plenty of ram, this can be done live in /tmp for example )
then recompress them with 'dir2xzm' or the 'Build Porteus Module' rightclick option
there are some forum threads addressing the idea of running porteus like a 'normal' system...
If that's the case, why does it boot (in stock form) on a FAT32 formatted partition? If it can boot using the XZM modules on FAT32, then surely it can run extracted on FAT32? What am I missing here? There must be some way to get it to work? The kernel boots and starts to load from FAT32, therefore the rest of the system can do the same, surely? For my purposes, I don't care about file ownership and permissions.

I've seen many of those forums, but none of them cater to my specific needs to tinker with it under Windows. I'll have a play with the bootloader and file structure, see if I can make any sense out of it.

mrme01
White ninja
White ninja
Posts: 5
Joined: 26 Aug 2015, 20:42
Distribution: Debian usually
Location: United Kingdom

Re: Extracted XZM modules on USB disk

Post#8 by mrme01 » 27 Aug 2015, 07:32


neko
DEV Team
DEV Team
Posts: 956
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: Extracted XZM modules on USB disk

Post#9 by neko » 27 Aug 2015, 09:22

I guess that your trouble is due to the dynamic linked Porteus kernel driver.
Please refer to
viewtopic.php?f=117&t=4696#p33995

In my first response, I wrote
" A kernel updated Porteus ISO".
This has meant that a updated ISO fixed the driver issue.

If my guess is correct, you may try
1. to replace initrd.xz with new one that was uploaded at
viewtopic.php?f=117&t=4696#p33995

or

2. to update kernel by the tool that was uploaded at
viewtopic.php?f=75&t=4788#p34856

Post Reply