Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

refractasnapshot with uefi support

Refracta Development, Scripts, etc.

refractasnapshot with uefi support

Postby fsmithred » Wed Jun 01, 2016 1:12 am

https://sourceforge.net/projects/refrac ... s/testing/
file is rs10prebeta.tar.gz

This one is in the testing folder for good reason. I put everything in functions, so that they can be called according to task, similar to what I did with refracta2usb. You can make an iso from start to finish, you can re-squash and pack a new iso, you can re-make the efi files and pack a new iso, or you can just run xorriso.

I think all of that is working. What's not working is the grub splash image. I had it working when I used refractasnapshot on cli, paused at edit_boot_menu, and copied over the efi files made with dzz's mkefi script.

In the tarball is refractasnapshot-gui, refractasnapshot.conf and a grub.cfg template (with auto-replaceable words). Unpack it and keep everything in the same directory. Edit the location of the grub_template in the config file, and run the script from that directory. It will use the excludes file from the installed version of refractasnapshot (which should be recent, but doesn't have to be the latest.)
Code: Select all
./refractasnapshot-gui -d -c refractasnapshot.conf
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby fsmithred » Thu Jun 02, 2016 1:17 am

Down around line 817, in the mkefi function, where copies splash.png to boot/grub, with the code like this, splash.png does get copied to the iso, but it doesn't show up at boot.
Code: Select all
   mkdir -p boot/grub/x86_64-efi
   mkdir -p efi/boot

   # copy splash
   cp "$iso_dir"/isolinux/splash.png boot/grub/
   
   # second grub.cfg file
   for i in $(ls /usr/lib/grub/x86_64-efi|grep


Like this, it works. The splash image shows up at boot. It's the same image file in both cases, and it gets copied to the iso in both cases. The only difference is putting the filename in the target. I don't get it.
Code: Select all
   mkdir -p boot/grub/x86_64-efi
   mkdir -p efi/boot

   # copy splash
   cp "$iso_dir"/isolinux/splash.png boot/grub/splash.png
   
   # second grub.cfg file
   for i in $(ls /usr/lib/grub/x86_64-efi|grep
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby fsmithred » Fri Jun 03, 2016 11:26 pm

I got it working and made debs. refractasnapshot-9.3.4+10.0.0beta01
https://sourceforge.net/projects/refrac ... s/testing/

There are four tasks. The first is the normal way to run. The others are for making changes in the filesystem copy or the iso files manually between runs.

1. Create a snapshot (with or without uefi support)
2. Re-squash and make iso (no-copy)
3. Re-make efi files and iso (no-copy, no-squash)
4. Re-run xorriso (make iso) only

I've only tested booting in efi mode in virtualbox and qemu. It still needs to be tested on hardware.

uefi-compliant refracta2usb coming soon.
Then on to the installer...
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby fsmithred » Wed Jun 08, 2016 2:11 am

The isos I've been making will boot in uefi mode in qemu and virtualbox. They will also boot when I make a live usb wtih refracta2usb and add the efi files manually.

If I dd the isohybrid image to a usb stick, it does not boot with uefi. I get "no bootable medium found". In legacy bios, they boot normally.

If I remove 'partition offset 16' and add '-isohybrid-gpt-basdat' to the xorriso command, and I boot the iso in vbox efi, I have to go to the Boot Manager and select 'EFI CD/DVD' to get to the grub boot menu.

Haven't tried burning to CD yet.

Update: CD boots in uefi or bios.
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby fsmithred » Thu Jun 09, 2016 12:23 pm

To get an isohybrid to boot with uefi when it is dd'd to a usb stick, the isohybrid needs to have two partitions in it - system in the first partition, /efi in the second partition. Then it will boot with uefi.

Use '-isohybrid-gpt-basdat' with xorriso to get this additional parition in the iso file. I don't see that option in the man page for xorriso, but it is documented in this man page for xorrisofs -
http://www.gnu.org/software/xorriso/man ... isofs.html
but apparently, the option works with xorriso, too. Oh, xorrisofs is a symlink to xorriso on my system.
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby thwak » Thu Jun 09, 2016 8:35 pm

antix/MX et al had this licked a year ago, so I'm left wondering why you're now still wrestling with efi issues. Same sense of wonderment toward why you're struggling with monkeypatching debian's deprecated live-boot rather than utilizing the wonderful live-boot, live-init stuffs the antix devs have created. You've checked? Is there anything lacking in the antix code? Here I've repeatedly read LUKS, LUKS... LUKS; not much mention of that in antix forum. Their stuffs won't support LUKS?
thwak
 
Posts: 174
Joined: Tue Nov 20, 2012 3:58 am

Re: refractasnapshot with uefi support

Postby fsmithred » Thu Jun 09, 2016 8:51 pm

No, I haven't looked at the antix stuff. Guess I will do that. I have no idea if it supports luks.

The reason I'm just getting around to it is because I could not test on hardware until now, and it was pointed out to me over a year ago that what works in VM doesn't necessarily work in real life.

More notes to myself (and anyone else who might be messing with the code,) This one seems to be working.
Code: Select all
uefi_opt="-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot"

xorriso -as mkisofs -r -J -joliet-long -l ${isohybrid_opt} -no-emul-boot \
-partition_offset 16 -V "snapshot-live-cd"  -b isolinux/isolinux.bin -c isolinux/boot.cat \
-boot-load-size 4 -boot-info-table ${uefi_opt}  -o "$snapshot_dir"/"$filename" iso/ \
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby thwak » Fri Jun 10, 2016 1:53 am

I don't use LUKS, so am largely ignorant regarding its dependencies.
IIRC, cryptdisk package is preinstalled in antix, but is not autostarted by default.
efi behaves differently under virtualbox? Ah, so far, I'm happily ignorant of (u)efi as well.

If you or anyone else reading this cares to inspect the antix scripts, can browse online here:
https://github.com/antiX-Linux
thwak
 
Posts: 174
Joined: Tue Nov 20, 2012 3:58 am

Re: refractasnapshot with uefi support

Postby fsmithred » Sat Jun 11, 2016 4:57 pm

luks comes with cryptsetup, which depends on dmsetup. I started looking at the antix code, and I don't really understand it yet. It looks like they're squashing the filesystem directly, without making an rsync copy. That's something Dean wanted to do but never figured out. I tried it once or twice, too.

To give a more complete answer to your question above, about why I'm still working with the debian-live tools:
- they still work and will continue for the lifetime of jessie and maybe beyond.
- I've got over 4000 lines of code depending on those packages. I can usually find where to tweak a script pretty quickly.
-AFAIK, others are still using adapted versions of the refracta tools in other distros.

I incorporated the changes to xorriso listed above and uploaded new debs.
refractasnapshot-9.3.4_10.0.0beta02
https://sourceforge.net/projects/refrac ... s/testing/
I like this one.
User avatar
fsmithred
 
Posts: 2093
Joined: Wed Mar 09, 2011 9:13 pm

Re: refractasnapshot with uefi support

Postby thwak » Sun Jun 12, 2016 4:26 am

rsync is employed when antix saves persistence data. See line150 here:
https://github.com/BitJam/Persist-Scrip ... rsist-save
thwak
 
Posts: 174
Joined: Tue Nov 20, 2012 3:58 am

Next

Return to Discuss

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred