Forum › Forums › New users › New Users and General Questions › default to persistent when booting live usb
- This topic has 10 replies, 3 voices, and was last updated Aug 7-6:02 pm by Danrobi.
-
AuthorPosts
-
June 12, 2019 at 4:55 pm #22832Member
smolin
How do I make a LiveUSB boot to persistent mode without intervention?
What I’ve done so far:
– downloaded antiX-17.4.1_x64-net.iso
– wrote to USB with dd (was this a mistake? see below)
– booted and used fdisk to add a new partition after the ones created from the ISO
– rebooted (to make kernel aware of new partition) and formatted with mkfs.ext4
– rebooted and used F5 to select “root” persistence
– used apt to add “atop” package to prove persistence
– rebooted to save changes to persistenceAll well and good, but on boot I have to watch and hit F5 at the right time to have it apply the persistence to the live image, and I need it to boot using the persistence mode by default, without user interaction.
Now I see in the Help info on the boot screen that there’s a missing option F8 to save boot defaults, that doesn’t appear because I used ‘dd’ to write the ISO to USB drive. If not dd then how to write the ISO to USB? I have access to MacOS and Linux computers.
Thanks for your help.
June 12, 2019 at 7:58 pm #22840Anonymous
::The preferred tool for creating a fully-featured LiveUSB is live-usb-maker. It is accessible via antiX ContolCenter.
June 12, 2019 at 8:51 pm #22842Membersmolin
::Thank you for the suggestion! So the process would look like
– dd vanilla iso to usb
– boot from usb
– fdisk to create a partition for persistence
– reboot
– mkfs new partition
– reboot with F5 to set up persistence
– modify live system as desired
– reboot to save persistence
– insert a second usb drive
– run live-usb-maker to clone the running system onto second usb drive (will it have the persistence boot options…)
– ???
– profit!(I notice from https://github.com/antiX-Linux/live-usb-maker that there’s a command-live version which is useful because I’m not installing X or any GUI on this system)
Thanks again!
June 12, 2019 at 11:29 pm #22849Anonymous
::run live-usb-maker to clone the running system onto second usb drive (will it have the persistence boot options…)
Yes.
and there’s no need to invoke “dd” manually.From your running antiX system (can be livesession), if you attach another USB pendrive and run live-usb-maker, choose the iso file as the source and target the second pendrive…
…OR just choose to have live-usb-maker clone the running system…
when the process completes (only takes a few minutes) you can shutdown, then immediately boot using the freshly-created pendrive. During first boot (or later, at your discretion) you can elect to setup persistence right from the boot menu. If it’s a legacy BIOS boot, you’ll also have “F8 save available”.
*IIRC, if cloning a persistent running system, the latest verion of live-usb-maker even provides the option to also clone the persistence rootfs and/or homefs file(s).
(edited to add, after proofreading: To be clear, if you setup persistence during first boot, persistence save can be performed during shutdown of that first session. Additionally, if you have elected “dynamic” persistence and “semi-automatic” save mode… in addition to save at shutdown, you can invoke the “persist-save” command at will during the session ~~ whenever you choose, as often as you choose.)
ps:
In addition to standard apt/dpkg commands, you’ll have a menu-ed utility named “cli-aptiX” (uppercase X) available, along with a cli version of the antiX ControlCenter, named “antiX-cli-cc”. FYI, plenty of other antiX specialty utilities are provided. Most of ’em reside under /usr/local/bin/
Helper apps are provided to easily adjust the console font. Check out:
man console-font-select
man console-width-select
(they’re available directly, or via the antiX-cli-cc menu)It’s been a while since I last booted the “antiX core edition”. I can’t recall whether ufw firewall is provided, and autostarted by default. I guess you know to launch sysv-rc-conf and check/tweak the autostarted services.
June 13, 2019 at 12:11 am #22853Anonymous
::here’s another “tip”:
To know which files-n-paths are NOT (by default) preserved across persistence sessions, inspect the exclusion patterns listed in these files:
/usr/local/share/excludes/persist-save-exclude.list
/usr/local/share/excludes/static-root-delete.listYou’ll might want to customize those lists. For instance, I prefer to not discard the downloaded apt packagelists.
June 13, 2019 at 10:51 am #22888Membersmolin
::Success! Thank you again, Skidoo. In case someone finds this thread and wants to follow in my footsteps, here’s the play-by-play:
Exercise: create a live-usb with persistence, DHCP, apt package manager, systemd-free, no GUI, ssh-enabled
Resources: internet connection, Mac or Linux computer, two usb drives (usb-one > 155M, usb-two > 207M)
1. Download antiX-17.4.1_x64-net.iso 2. insert usb-one, note device path for next step (lsblk in Linux, "diskutil list" in MacOS)Make sure you use the right number in place of # or you can destroy your current system:
3. dd if=antiX-17.4.1_x64-net.iso of=/dev/disk# bs=8m 4. boot from usb-one; insert usb-two and note device path for next step 5. live-use-maker --from=clone 6. reboot from usb-two, using F5 to select persistence option and F8 to save boot parameters.You can remove usb-one, you’re done with that one.
7. at this boot you'll be prompted for persistence settings 8. apt install -y openssl ca-certificatesStats (approximate, I’ve added a couple other packages): 284 packages, 207M disk space, 92M RAM, 155 processes, 29 services
[edit: use “code” tag to preserve double-dash]
- This reply was modified 3 years, 11 months ago by smolin.
June 13, 2019 at 11:49 am #22897Anonymous
::re: Step 5
(mentioning this for the benefit of future readers)
The forum software mangled (autoconverted) “minus minus” to “longdash”June 13, 2019 at 6:36 pm #22927Membersmolin
::Sorry, me again! First of all, I feel a little whiney here, so let me say that the Antix tools are top-notch, I’m really impressed! For me they just barely miss the mark, though: live-usb-maker lets you make new usb with a vanilla live Antix on it; live-remaster gives you a custom live Antix with your modifications (apt installs and so on) applied … but does it in-place on the running usb! Can I get the custom live Antix copied onto a new usb drive?
Exercise: create a pair of live-usb with persistence, DHCP, apt package manager, systemd-free, no GUI, ssh-enabled.
Resources: internet connection, Mac or Linux computer, *four* usb drives.
Warning: replace the # correctly in step 3 or you can wipe your hard drive.
Untested:
1. Download antiX-17.4.1_x64-net.iso 2. insert usb-one, note device path for next step (lsblk in Linux, "diskutil list" in MacOS) 3. dd if=antiX-17.4.1_x64-net.iso of=/dev/disk# bs=8m 4. boot from usb-one 5. insert usb-two and note device path for next step 6. live-use-maker --from=clone 7. reboot from usb-two, using F5 to select persistence option and F8 to save boot parameters. 8. write a *script*, eg adduser jdoe; apt install -y openssl ca-certificates 9. use dd to duplicate usb-two onto usb-three (probably have to reboot using usb-one first) 10. boot from usb-three 11. apply customize script created in step 8 12. live-remaster and follow promptsRepeat steps 9 through 12 with usb-four in place of usb-three to make another one. Suggestions for shortcuts?
June 13, 2019 at 7:30 pm #22928Anonymous
::live-usb-maker lets you make new usb with a vanilla live Antix on it
When you launch live-usb-maker and choose “clone the live running system” from its menu options, it should create an up-to-the-minute copy of the running system (not copy of a “vanilla” system).
at Step 9, seems to me that you could/should just attach “usb #3”, launch live-usb-maker and choose usb#3 as the target… then eject usb#3, attach usb#4 and again launch live-usb-maker, choosing usb#4 as the target.
via commandline options or menu selection, the equivalent of
– -from=clone – -format=ext4
should preclude the need to use the “dd” commandJune 14, 2019 at 8:15 am #22964Membersmolin
::Still not working for me, can you spot anything I’m doing wrong? I just tried it again from scrach, steps 1-7 as above, then
8. customize system with "apt install atop" 9. insert usb-three 10. live-usb-maker --from=clone 11. reboot from usb-threeAt this point “type atop” replies “atop: not found” so the changes in step 8 are not surviving live-usb-maker in step 10. I’ve tried both “root” and “static” persistence. I tried adding a reboot between 8 and 9 to make sure the changes are “persisted”.
Thanks again for all the help.
August 7, 2019 at 6:02 pm #25505MemberDanrobi
::Hello what would you remove if you would want your mouse speed settings to remain saved?
I have this issue here:
https://www.antixforum.com/forums/topic/persistent-issue/#post-25465
The start option at control center / mouse option doesnt stay saved either, i’ve tried many times.
I use persistent static option, is this causing the issue?
Thanks!- This reply was modified 3 years, 9 months ago by Danrobi.
-
AuthorPosts
- You must be logged in to reply to this topic.