LinuxQuestions.org
Visit Jeremy's Blog.
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,573

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
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 07-15-2019, 09:14 AM   #2
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
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.
 
1 members found this post helpful.
Old 07-16-2019, 05:42 AM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
thanks colorpurple 21859!
what syslinux errors do you get?
I'll look into the grub stuff too
right now I'm back at post 72 in slacker live thread and trying to fix the slackerc iso...
 
Old 07-16-2019, 09:29 AM   #4
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
I'll have to wait till I get home tonight to check out the errors
 
Old 07-16-2019, 09:38 AM   #5
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
I tried the iso in a vm and the error was
Quote:
fail to load lDlinux.c32
 
Old 07-16-2019, 02:22 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
hey did you use a slackware system to install syslinux or from your debian box?
Slackware uses 4.08 and debian uses 6.04 and they are not compatible
If using Slackware to install syslinux to usb booting slax or debian derivatives, copy over your slackware /usr/share/syslinux/isolinux.bin and /usr/share/syslinux/vesamenu.c32, then install syslinux to usb
 
1 members found this post helpful.
Old 07-16-2019, 02:43 PM   #7
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Quote:
hey did you use a slackware system to install syslinux or from your debian box?
I first dd iso to usb and then rufus, rufus matches syslinux version to the version used in the iso.
Are you using Debian to create the iso images for slacker and for this iso here?
 
Old 07-16-2019, 02:54 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
I use slackware to create the slacker iso's and debian to create the roninos/slax iso's
if the slackerc mini iso works for you I'll start working on the debian stuff thanks for your help
 
1 members found this post helpful.
Old 07-16-2019, 03:05 PM   #9
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
I use slackware-current to make the slacker iso efi bootable. I extract the slacker iso contents to a directory,do what needs to be done, then regenerate the iso with efi stuff added to the mkiso command
 
Old 07-16-2019, 03:08 PM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
ok yes thats what I did with the mini I uploaded, it should work efi...
 
Old 07-18-2019, 09:11 AM   #11
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
This will give you an idea on how to efi with Debian.
I created a Debian 10 virtual legacy machine
added contrib non-fee to the /etc/sources.list and ran apt upate.
Code:
 apt install grub-efi xorriso genisoimage zip sqashfs-tools syslinux syslinux-utils
downloaded live kit and followed the instructions to make a live data files named mydeb.

In the live kit data files created an EFI/BOOT with the make-grub.sh grub-embedded.cfg from here http://www.slackware.com/~alien/liveslak/EFI/BOOT along with a standard grub.cfg with menuentries

made a empty /boot/mydeb text file and edited the efi/boot/grub-embedded.config to this
Code:
search --file --no-floppy --set=root /boot/mydeb
the empty text file can be any unique name that isn't located in the EFI directory

cd to EFI/BOOT and ran the make-grub.sh script

edited the gen.mydeb.iso.sh with this
Code:
cd <location of livekit files> && xorriso -as mkisofs -o ../mydeb-x86_64.iso -v -J -R -D -A mydeb -V mydeb -no-emul-boot -boot-info-table -boot-load-size 4 -b boot/isolinux.bin -c boot/isolinux.boot -eltorito-alt-boot -e boot/syslinux/efiboot.img -no-emul-boot .
the genisoimag was changed to "xorriso -as mkisofs" and the efi stuff add at the end of the line

generate the iso
isohybrid iso
isohybrid -u iso

Last edited by colorpurple21859; 07-18-2019 at 01:39 PM.
 
1 members found this post helpful.
Old 07-18-2019, 01:52 PM   #12
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
That's awesome! Thank you!
Now
what do you mean by this?
Quote:
the empty text file can be any unique name that isn't located in the EFI directory
Why can't it be located in EFI directory?
also I noticed in the RoninOS build I went to install grub-efi and it wanted to uninstall grub-pc....so does that mean if a person had a legacy bios the grub-efi would not install or does grub-efi go both ways?
 
Old 07-18-2019, 02:44 PM   #13
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
it is a marker file so the emedded grub can locate the correct partition
in Debian opened file manager go to here you want the file I used mydeb/boot: right-click>Create New>Empty File. The second attempt I only modified the bare minimum when using the live kit put the file in the root of the iso so used mydebsystem so not to conflict with the directory mydeb

Last edited by colorpurple21859; 07-18-2019 at 02:49 PM.
 
Old 07-18-2019, 03:02 PM   #14
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
mmm...ok in the new slackerc iso I jsut uploaded this morning I used the liveslak efi/boot/grub-embedded.cfg and made a SLACKERC empty file in efi/boot folder and used the make-grub.sh you mentioned and because im not very fluent on cp commands I had to edit like this so it would either put efiboot.img in /boot/isolinux or in the bootfiles folder in /root/linux-live folder

Code:
cd ../
mv BOOT/efiboot.img ../boot/isolinux/
mv BOOT/efiboot.img ../bootfiles/isolinux
anyway then I dd'd it to usb, no problems
then I used cp command to install iso to usb
Code:
cp Slackerc-current-071819-x86_64.iso /dev/sdc
and it worked basically like dd command? it ran fine

then I installed to fat32 usb and used syslinux, no problems
Now, I only need to know if it will boot on efi system
Question-
do I really need kernel/initrd in boot /boot folder and /efi/boot folder?
 
Old 07-18-2019, 03:38 PM   #15
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,350

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Quote:
SLACKERC empty file in efi/boot folder
The file needs to be somewhere other than the efi folder, in one of the other folders or in the / of the iso.

Last edited by colorpurple21859; 07-18-2019 at 03:39 PM.
 
  


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 02:47 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