LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-13-2019, 05:18 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,547

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
Tutorial- Remastering/Upgrading Slax 9.9.1 (Debian Stretch) to Bullseye


Slax is based on Debian (Stretch), so I wanted to see if I could both upgrade to Bullseye/Testing and remaster it using Linux Live kit (both Slax and Linux live kit are made by Tomas M). Optionally wanted to install it to hard drive and it'll run just like any other Debian full install to hard drive.

Step 1)
Go get Slax and the newest linux-live-kit
https://www.slax.org/

https://www.linux-live.org/

Step 2)
Install Slax to a fat32 or ext4 formatted USB or frugally install it to hard drive (runs faster).
Frugal install to hard drive is exactly like install to usb, you just copy slax folder to a hard drive partition using Grub bootloader or Lilo. Note that the slax folder will not change or modify your existing Windows or Linux installs to hard drive, it simply boots and lives out of the slax folder.

Here's an example grub.cfg entry for Slax, note the boot parameters "slax.flags=perch,toram,automount"

Code:
menuentry 'Slax' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b72ad7a1-89ab-48c9-a8b4-e40f8f7e024b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  b72ad7a1-89ab-48c9-a8b4-e40f8f7e024b
	else
	  search --no-floppy --fs-uuid --set=root b72ad7a1-89ab-48c9-a8b4-e40f8f7e024b
	fi
	linux	/slax/boot/vmlinuz vga=normal initrd=/slax/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=perch,toram,automount
	initrd	/slax/boot/initrfs.img
}
Step 3)
Boot up into Slax off usb or hard drive, make sure you are running persistent "slax.flags=perch" in syslinux.cfg, modify /etc/apt/sources.list and change wherever it says "stretch" to "bullseye". Now do apt update and apt full-upgrade

It'll upgrade everything including kernel but you gotta install some extra stuff for the remaster to work.
After upgrades finish, do apt install isomaster bleachbit gparted synaptic aufs-dkms auf-tools linux-headers-4.19.0-5-amd64
Now, dpkg will install the aufs module so it can boot live.

Now- you have to make a new initrfs.img with your new kernel to boot in live mode.
First you have to unpack your linux-live-kit somewhere, I extract it to /root
Then you gotta edit linux-live-kit/config and linux-live-kit/build scripts
In this example I'm using newest live kit "linux-live-2.3"
Edit config and build scripts for location of new remaster, new kernel and make sure you put "slax" in the config script as so.

# Live Kit Name. Defaults to 'linux';
# This will be the name of the directory created on your CD/USB, which
# will contain everything including boot files and such.
# For example, Slax changes it to 'slax'
# Must not contain any spaces.
# If you change it, you must run ./tools/isolinux.bin.update script
# in order to update isolinux.bin for CD booting.
# If you do not need booting from CD (eg you're booting only from USB)
# then you can ignore recompiling isolinux.bin, just rename LIVEKITNAME
# and you're done.
LIVEKITNAME="slax"

# Kernel file, will be copied to your Live Kit
# Your kernel must support aufs and squashfs. Debian Jessie's kernel is ready
# out of the box.
#VMLINUZ=/vmlinuz
VMLINUZ=/run/initramfs/memory/data/slax/vmlinuz

# Kernel version. Change it to "3.2.28" for example, if you are building
# Live Kit with a different kernel than the one you are actually running
#KERNEL=$(uname -r)
KERNEL=4.19.0-5-amd64

Now also edit this entry in config and build so it doesn't put your remaster in /tmp or it'll get discarded at reboot
config script-
# Temporary directory to store livekit filesystem
#LIVEKITDATA=/tmp/$LIVEKITNAME-data-$$
LIVEKITDATA=/livecd/$LIVEKITNAME-data-$$

and build script-
cd "$LIVEKITDATA"
ARCH=$(uname -m)
#TARGET=/tmp
TARGET=/livecd

Now, you gotta make a new initrfs.img for new kernel so you can reboot into new kernel live.
Go into the linux-live-2.3/initramfs folder and invoke the initramfs_create script in terminal as so
./initramfs_create
And it'll create a initramfs for new kernel 4.19.0-5-amd64 in /tmp
Note the new initrfs will have a variable name, mine came out as "slax-initramfs-7829.img"
Now copy your new kernel in /boot and new /tmp/initrfs.img to your slax folder on usb or hard drive, it's in /run/initramfs/memory/data/slax/boot but first back up the original kernel and initrfs.img
Code:
cd  /run/initramfs/memory/data/slax/boot
mv vmlinuz vmlinuz-old
mv initrfs.img initrfs.img-old
cp -r /boot/vmlinuz-4.19.0-5-amd64 /run/initramfs/memory/data/slax/boot/vmlinuz
cp -r /tmp/slax-initramfs-7829.img /run/initramfs/memory/data/slax/boot/initrfs.img
Now you have a new kernel installed and everything upgraded so you can reboot now and then do the remaster.
Reboot and make sure you are running persistent with new kernel

Step 4)
Uninstall old kernel (from stretch, mine was 4.0.9 or something) using synaptic package manager, then go into linux-live-2.3 folder and run the build script. Note you can uninstall or install as much as you like.
cd /root/linux-live-2.3
./build

And it'll build your new slax system.

Note, I've tried to add EFI support in this iso but I don't have a efi machine so please tell me if that works or not, thanks

I uploaded my remaster here, about 460MB isohybrid
https://sourceforge.net/projects/ron...les/remasters/

Last edited by linus72; 07-13-2019 at 05:22 PM.
 
Old Yesterday, 09:14 AM   #2
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,070

Rep: Reputation: 500Reputation: 500Reputation: 500Reputation: 500Reputation: 500Reputation: 500
I couldn't get the iso to boot legacy or efi, tried dd, rufus, virtual machine. In legacy mode I get syslinux errors, In efi I get the grub prompt, I think the problem is with the grub.cfg files. I haven't had time to investigate any of the boot problems.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bullseye djk44883 Debian 2 07-10-2019 08:51 AM
How To: Remastering Debian Stretch/Buster using Linux-live-debian-050419 into a Live CD/DVD/USB/HDD linus72 Debian 0 05-05-2019 05:44 PM
LXer: Debian 11 "Bullseye" and Debian 12 "Bookworm" Are Coming After Debian 10 "Buster" LXer Syndicated Linux News 0 04-18-2018 12:26 PM
slax or slackware remastering saied Slackware 1 12-10-2005 10:20 AM
Slax remastering help cheetahman Slackware 48 08-16-2005 12:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration