You are not logged in.

#1 2017-11-27 08:32:53

thanhyen
Member
Registered: 2017-11-27
Posts: 2

Boot from extracted airootfs.sfs

As i read in Wiki https://wiki.archlinux.org/index.php/Re … nstall_ISO
to customize Install .iso file, i followed this instruction:

1. mount iso file:

#mkdir mount-point
#mount -o loop archlinux-2017.07.01-x86_64.iso mount-point

2. unsquash compressed filesystem:

#unsquashfs mount-point/arch/x86_64/airootfs.sfs

3. customize

#arch-chroot squashfs-root /bin/bash
#(do something)

4. re-compress modified filesystem

#rm mount-point/arch/x86_64/airootfs.sfs
#mksquashfs squashfs-root airootfs.sfs
#mv airootfs.sfs mount-point/arch/x86_64/

5. instead of creating new iso, i directly boot it from grub:

menuentry "Arch /dev/sda4" {
  set root='hd1,msdos4'
  linux /arch/boot/x86_64/vmlinuz 
  initrd /arch/boot/x86_64/archiso.img
  boot
}

How can i make grub boot directly from folder squashfs-root as filesystem?
I meant to make system "mount" squashfs-root folder by the same way it does to airootfs.sfs

Just say that it's tiring to repeat these steps each time i want to make a change on install file.

Last edited by thanhyen (2017-11-27 15:39:46)

Offline

#2 2017-11-27 18:34:27

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Boot from extracted airootfs.sfs

You need to use GRUB's (loop) directive and some added kernel parameters, see https://wiki.archlinux.org/index.php/Mu … ly_release

EDIT: sorry, that's not what you're asking, I misread your post.

I don't think GRUB can boot a filesystem tree unless it is on it's own partition or subvolume. But I may be wrong.

Last edited by Head_on_a_Stick (2017-11-27 18:55:48)

Offline

#3 2017-11-28 04:08:24

thanhyen
Member
Registered: 2017-11-27
Posts: 2

Re: Boot from extracted airootfs.sfs

@Head_on_a_Stick thanks for your answer.
I also tried to boot extracted filesystem.squashfs of Kali linux on a seperate partition.
modprobe could recognize that partition and GRUB successfully boot from that as well, although GDM was unable to start then i got stuck in TTY.

Anyhow, it seems to be not possible to boot system that way.
I think it's better to have a persistent  partition for distros like Kali, otherwise recompressing squashfs-root is a must ( though there might be a way to build persistent hook for Arch, i guess)

Have a great day smile

Offline

Board footer

Powered by FluxBB