Live USB flash drive [Solved]
Live USB flash drive
I'd like to know whether the system on an MX live USB flash drive without persistence will ever write to that drive (logs, for example) or whether all logs etc. stay in RAM. I don't imagine it'll make a difference, but in case it does, it's MX19.3 live running on a mac mini late 2012, Core i7 2.3 MHz processor, 8 GB RAM and reading files from an external hard drive. Sorry if this has been answered already, but I couldn't find it in the manual, wiki or forum. Thanks.
Re: Live USB flash drive
Without persistence (unless you "remaster" manually) everything will be just temporary, till you shut down.
Re: Live USB flash drive
Without persistence, nothing is written to the USB. I believe I saw some place in this forum that talked about creating a method to have it write TO a hard drive if available, however that had to be setup in the liveUSB before writing it. (or set every boot otherwise.)
What I have done in the past, is to setup my own LiveUSB, and have it look for a specific hard drive partition with a set of scripts on that hard to run if found. Those scripts then setup and would use a predefined ( and pre-existing ) data area, complete with: documents, pictures, configs, scripts and logs all on the hard drive.) One of the scripts set logging locally on the hard drive as well.
What I have been using more and more, is a LiveUSB where I recover the 'extra' space' back, and then setup a data partition for me to write too - only if I need it. ( say you use a 64gb usb stick, I set it up so that I have LiveUSB partition and then remaining gigs usable ( 60gb ish ) as a data partition.) This works REALLY well for me, as the liveUSB is always the same as when written, and only I get to write to the 'Data' partition - when I want to!
What I have done in the past, is to setup my own LiveUSB, and have it look for a specific hard drive partition with a set of scripts on that hard to run if found. Those scripts then setup and would use a predefined ( and pre-existing ) data area, complete with: documents, pictures, configs, scripts and logs all on the hard drive.) One of the scripts set logging locally on the hard drive as well.
What I have been using more and more, is a LiveUSB where I recover the 'extra' space' back, and then setup a data partition for me to write too - only if I need it. ( say you use a 64gb usb stick, I set it up so that I have LiveUSB partition and then remaining gigs usable ( 60gb ish ) as a data partition.) This works REALLY well for me, as the liveUSB is always the same as when written, and only I get to write to the 'Data' partition - when I want to!
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
Re: Live USB flash drive
On writeable LiveUSB e.g. generated with MX/antiX LiveUSB Maker tool,psychlone wrote: Sun Jul 02, 2023 2:18 pm I'd like to know whether the system on an MX live USB flash drive without persistence will ever write to that drive (logs, for example) or whether all logs etc. stay in RAM. I don't imagine it'll make a difference, but in case it does, it's MX19.3 live running on a mac mini late 2012, Core i7 2.3 MHz processor, 8 GB RAM and reading files from an external hard drive. Sorry if this has been answered already, but I couldn't find it in the manual, wiki or forum. Thanks.
there are some "state" files which will be written to the the LiveUSB.
The term "persistence" is normally used in regard to save of root- or home persistence.
But even without persistence The liveSystem can be setup in a way to save
state files.
Those can be machine-specific state files, something like wifi-connections,
but also general state files. Also some logs can be written like remaster.log.
Have a look int /antiX/state directory.
I think those what can be saved, are somewhre adjustable, but need to have a look to find those settings.
I believe those files
Code: Select all
/antiX/state/machine-state-files
/antiX/state/general-state-files
Re: Live USB flash drive
@fehlix a question: Wouldnt those 'state logs' invalidate a crc check on the LiveUSB?
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
Re: Live USB flash drive
The /antiX/state folder is on the LiveUSB main ext4 partition outside the persistence files rootfs/homefs.CharlesV wrote: Sun Jul 02, 2023 8:35 pm @fehlix a question: Wouldnt those 'state logs' invalidate a crc check on the LiveUSB?
So something, what user can do by writing directly onto the LiveUSB into /Live-usb/storage/demo, which is bind-mounted onto /home/demo/Live-usb-storage during the live session.
So any check sums are not invalidated by this.
Re: Live USB flash drive
Thank you all for the replies.
To be clear, my preference is for nothing to be written to the USB stick by the system. I am using the live usb to play music from an external hard drive and nothing else: I won't ever update it, I won't remaster it, I won't go online with it, I won't save files to it. Perhaps I should also mention that it's been produced from a snapshot (with accounts) of a system that's been set up as I want it, so there will be no changes made during operation that need to be saved. As far as I can see, having the system write to the drive gives no advantage, and has the disadvantage of wearing the drive out quicker.
Would I be right in thinking that if I edit GRUB at boot with a 'toram' parameter so that everything runs in RAM, nothing will get written to the USB drive (obviously I could dismount and remove the stick after booting so that it wouldn't be available for writing to, but I'd prefer not to do that because my Mac is tucked away in a fairly inaccessible place, and also the arrangement of USB ports on it is designed for people with smaller hands than mine).
@fehlix - thank you very much for the information about the state files. Do you know whether, during any given session, the state files are read at any time after they've been written to in that session? What I'm thinking is that if their only purpose is to carry information over to the system after reboot, I could edit /antiX/state/machine-state-files and /antiX/state/general-state-files so that nothing gets written from now on (leaving in place the files currently in the folders /antiX/state/general and /antiX/state/machine), and it would do no harm (given that there won't be any changes that I want kept). Is that right?
To be clear, my preference is for nothing to be written to the USB stick by the system. I am using the live usb to play music from an external hard drive and nothing else: I won't ever update it, I won't remaster it, I won't go online with it, I won't save files to it. Perhaps I should also mention that it's been produced from a snapshot (with accounts) of a system that's been set up as I want it, so there will be no changes made during operation that need to be saved. As far as I can see, having the system write to the drive gives no advantage, and has the disadvantage of wearing the drive out quicker.
Would I be right in thinking that if I edit GRUB at boot with a 'toram' parameter so that everything runs in RAM, nothing will get written to the USB drive (obviously I could dismount and remove the stick after booting so that it wouldn't be available for writing to, but I'd prefer not to do that because my Mac is tucked away in a fairly inaccessible place, and also the arrangement of USB ports on it is designed for people with smaller hands than mine).
@fehlix - thank you very much for the information about the state files. Do you know whether, during any given session, the state files are read at any time after they've been written to in that session? What I'm thinking is that if their only purpose is to carry information over to the system after reboot, I could edit /antiX/state/machine-state-files and /antiX/state/general-state-files so that nothing gets written from now on (leaving in place the files currently in the folders /antiX/state/general and /antiX/state/machine), and it would do no harm (given that there won't be any changes that I want kept). Is that right?
Re: Live USB flash drive
Probably both,psychlone wrote: Mon Jul 03, 2023 11:00 am Thank you all for the replies.
To be clear, my preference is for nothing to be written to the USB stick by the system. I am using the live usb to play music from an external hard drive and nothing else: I won't ever update it, I won't remaster it, I won't go online with it, I won't save files to it. Perhaps I should also mention that it's been produced from a snapshot (with accounts) of a system that's been set up as I want it, so there will be no changes made during operation that need to be saved. As far as I can see, having the system write to the drive gives no advantage, and has the disadvantage of wearing the drive out quicker.
Would I be right in thinking that if I edit GRUB at boot with a 'toram' parameter so that everything runs in RAM, nothing will get written to the USB drive (obviously I could dismount and remove the stick after booting so that it wouldn't be available for writing to, but I'd prefer not to do that because my Mac is tucked away in a fairly inaccessible place, and also the arrangement of USB ports on it is designed for people with smaller hands than mine).
@fehlix - thank you very much for the information about the state files. Do you know whether, during any given session, the state files are read at any time after they've been written to in that session? What I'm thinking is that if their only purpose is to carry information over to the system after reboot, I could edit /antiX/state/machine-state-files and /antiX/state/general-state-files so that nothing gets written from now on (leaving in place the files currently in the folders /antiX/state/general and /antiX/state/machine), and it would do no harm (given that there won't be any changes that I want kept). Is that right?
* toram and pullout the stick after boot
* remove any entries within the state-files
Re: Live USB flash drive [Solved]
Maybe just create a non-writable/read-only LiveUSB by using dd-dump modepsychlone wrote: Mon Jul 03, 2023 11:00 am To be clear, my preference is for nothing to be written to the USB stick by the system. I am using the live usb to play music from an external hard drive and nothing else: I won't ever update it, I won't remaster it, I won't go online with it, I won't save files to it.
either within Live USB Maker dd-dump mode.
Or any other iso-to-usb image-writer tool.
E.g on command line with dd-live-usb
Code: Select all
dd-live-usb --help
Usage: dd-live-usb [<options>]
A save and convenient way to make a "dd" live-usb from a .iso file.
Will prompt you for the file and for the device to write to if they
are not given on the command line.
Options:
-C --color=<xxx> Set color scheme to off|low|low2|bw|dark|high
(default is high)
-F --force=usb Disable safety check that ensures we only write to usb
and removable devices
-f --from=<file> The iso file to copy
-h --help Show this usage
-P --progress=<type> Type of progress indicator: bar|percent|none
(the default is bar)
-t --to=<device> The device to write to
-v --version Show the version number and date