Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] persistence difficulty
#1
i have no problem with formating disk and have several iso's in a 14gig stick all but one booted.

on a new 4gig stick i am trying to get persistence with  linuxmint-19.3-xfce-64bit.iso which i note docs mention has been tested.

First my formated usb stick when mounted. it looks like  this:

ventoy
├── CreatePersistentImg.sh
├── ISO
│   └── linuxmint-19.3-xfce-64bit.iso
├── persistence.img
└── ventoy.json

in ventoy.json I have :

{
  
   "control": [
        { "VTOY_DEFAULT_MENU_MODE": "1" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_DEFAULT_SEARCH_ROOT": "/ISO/" }
    ]
     
    "persistence" : [
        {
            "image": "/ISO/linuxmint-19.3-xfce-64bit.iso",
            "backend": "persistence.img"
        }
    ],
   
 //there was a missing ", "    above but still not working
   
   
   
}



the first thing i note is that when CreatePersistentImg.sh is run i get a file  called  "persistence.img"
i did see in docs such as :

/persistence/ubuntu_20.04_1.img",",

would i be right that  persistence.img is renamed to "ubuntu_20.04_1.img"
and is at /ventoy/persistence/ubuntu_20.04_1.img and ventoy.json is edited accordingly ?

also when running CreatePersistentImg.sh i get an issue:


bash-5.0$ cd /run/media/andrew/ventoy/
bash-5.0$ ls --color
CreatePersistentImg.sh  ISO  ventoy.json
bash-5.0$ su
Password:
bash-5.0# chmod a+x CreatePersistentImg.sh
bash-5.0# ./CreatePersistentImg.sh
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 113.815 s, 9.4 MB/s
mke2fs 1.45.5 (07-Jan-2020)
/dev/loop0 contains `ISO-8859 text, with very long lines, with no line terminators' data
Proceed anyway? (y,N)

i just entered y
as i say i acn boot iso but there is no sign of choice of choice of selecting persisitence
Reply
#2
1. ventoy.json must under ventoy directory, that is /ventoy/ventoy.json yes, you should rename the default persistence.img to what you want.
2. maybe something about the file encoding?
Reply
#3
(05-31-2020, 02:15 PM)longpanda Wrote: 1. ventoy.json must under ventoy directory,  that is  /ventoy/ventoy.json    yes, you should rename the default persistence.img to what you want.
2. maybe something about the file encoding?
if CreatePersistentImg.sh just creates a file called persistence.img and it has caused me an error, then in theory i should just be able to use the command line to create my own persistence.img

i have utility falocate and so created raw.img via:

# fallocate -l 1G pesistence.img

which i could now format to ext4

i'm a little confused with the mention of "label" casper-rw

if you format a usb sticj for instance say with gparted and give it a label say "spare" then the usb sticj becomes "spare" so wondering where a label "casper-rw" comes into it yet the file is still named "persistence.img"?
Reply
#4
The label is something of the filesystem(ext4/xfs) not the partition.
casper-rw is the default label used by ubuntu and some distros based on it. During boot the system will search for a block device with casper-rw label, if found, then it will mount it as the persistent envrioment.
Reply
#5
(06-01-2020, 11:06 AM)longpanda Wrote: The label is something of the filesystem(ext4/xfs) not the partition.
casper-rw is the default label used by ubuntu and some distros based on it.  During boot the system will search for a block device with casper-rw label, if found, then it will mount it as the persistent envrioment.
 ok i checked my ventoy.json syntax is Ok .

i formated persistence.img using :

#  mkfs.ext4  -O 64bit  -L casper-rw persistence.img

//on boot it will boot iso no problem but not picking up nor giving option for persistence ?
Reply
#6
When you in ventoy boot menu,  press c to enter grub shell  and run  vt_dump_persistence  and  help to send me the output.
Reply
#7
(06-01-2020, 02:35 PM)longpanda Wrote: When you in ventoy boot menu,  press c to enter grub shell  and run  vt_dump_persistence  and  help to send me the output.

i mounted persisitence.img

losetup  /dev/loop0 persistence.img

i get : bash-5.0# lsblk -f  /dev/loop0
NAME  FSTYPE LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0 ext4   casper-rw 54a35dfa-1bb3-4f28-bbde-ef2cab798445               
bash-5.0#

iso boots using new release from grub i get , see image

basically i can get grub options and an output for vt_dump_menu but nothing for vt_dump_persistence


Attached Files Thumbnail(s)
   
Reply
#8
(06-02-2020, 12:43 PM)captain-sensible Wrote:
(06-01-2020, 02:35 PM)longpanda Wrote: When you in ventoy boot menu,  press c to enter grub shell  and run  vt_dump_persistence  and  help to send me the output.

i mounted persisitence.img

losetup  /dev/loop0 persistence.img

i get : bash-5.0# lsblk -f  /dev/loop0
NAME  FSTYPE LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0 ext4   casper-rw 54a35dfa-1bb3-4f28-bbde-ef2cab798445               
bash-5.0#

iso boots using new release from grub i get , see image

basically i can get grub options and an output for vt_dump_menu but nothing for vt_dump_persistence


If  vt_dump_persistence print nothing, that means there is some error in ventoy.json (syntax error or file path error).

You can use some online tool  like  http://json.parser.online.fr  or  http://json.cn/ 
just copy the json context to the left and see the right whether there is some syntax error.

For your ventoy.json

{
 
  "control": [
        { "VTOY_DEFAULT_MENU_MODE": "1" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_DEFAULT_SEARCH_ROOT": "/ISO/" }
    ]  <---------- here miss a  comma
    "persistence" : [
        {
            "image": "/ISO/linuxmint-19.3-xfce-64bit.iso",
            "backend": "persistence.img"
        }
    ],  <---------- There shouldn't be a comma here
}
Reply
#9
Hello,

1st: Thanks for this amaizing project.
2nd: i need help with persistence too.

ran the script simple without any parameters ( fs, label, size, etc ) and with that .img file and i managed to see it while using: 
 
fdisk -l 

mounted ( tried to mount /mnt/linux & /mnt/kali )
created ( persistence.conf + "/ union" inside )  
umounted

Not working.

i made again .img file

the persistence.img now is a ext3 ( made with your script & infos from kali.org/prst )
i cant find now the .img while using fdisk -l

My steps are in the pics attached.

All the above tests are made in a VBOX machine UEFI.

What i am missing?


If more infos are needed i can provide.


Attached Files Thumbnail(s)
           
Reply
#10
Just joined the conversation .... here is my contribution taken from https://forums.ventoy.net/sendthread.php?tid=75

I have tried to follow the instructions for setting up Ventoy to run Linux Mint 19.3 Cinnamon 64bit with persistence, i.e. including creating persistence.img and a ventoy.json file in a ventoy folder.

When I boot from the USB stick, I can run Ventoy and but I only get one option (I only have one .iso file on the stick) to boot into and run Linux Mint 19.3 ...

However, I get no persistence option in the start-up phase and it clearly isn't running in persistence mode  Confused

So what could be wrong?
I an running Ventoy version 1.0.11 - I tried updating to 1.0.12 but it "refused" ... Sad

On the USB stick, I have all the files (config files; script; image file; iso file) on the same partition /deb/sdb1. Is this right?

I notice in some other posts on "persistence", the ventoy.json file has some extra definitions for size etc that are not in the version I used from your notes for setting up persistence ...
I didn't realise you needed a lot of persistence to get persistence working!  Tongue

Any help would be greatly appreciated.

Regards,
David
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)