You are not logged in.

#1 2018-07-12 11:13:24

linux_user
Member
Registered: 2016-11-04
Posts: 226

[Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

This tutorial also works on Bunsenlabs Helium. So I thought I'd simplify it and post it here. All credit to the original author.

Step 1: Create a new partition table
``````````````````````````````````````````````````````
Using gparted or any other hdd application, create a new partition table (msdos, and not gpt) on your external device.

Step 2: Partition you USB stick
``````````````````````````````````````````````
Make 2 partitions:
a) 1.5GB fat32 partition with any label (I am using 'XFCE' for this post) and check the 'boot' flag.
b) An ext4 file system of the remaining space with label 'persistence', ignoring the quotes.

Step 3: Mount the two partitions
``````````````````````````````````````````````````
Click on both partitions in file explorer to mount it or remove the USB and plug it back in.

Step 4: Execute
```````````````````````
Change the mount point of the partitions, your actual username instead of username, iso location and device ids (sdX) in the below code according to your system's and execute the code one at a time.

$ sudo apt-get install gparted mbr dosfstools p7zip syslinux
$ cd /media/username/XFCE
$ 7z x /home/username/downloads/bl-Helium_amd64+build2.iso
$ mv isolinux syslinux
$ mv syslinux/isolinux.cfg syslinux/syslinux.cfg
$ mv syslinux/isolinux.bin syslinux/syslinux.bin
$ sed -i 's/\(append boot=.*\)$/\1 persistence/' syslinux/live.cfg
$ sudo chown username /media/username/persistence
$ cd /media/username/persistence
$ echo / union > persistence.conf
$ cd
$ umount /media/username/XFCE
$ umount /media/username/persistence
$ sudo /sbin/install-mbr /dev/sdX
$ sudo syslinux -i /dev/sdX1

Single command execution
`````````````````````````````````````````
If you wish to execute the entire code in one command, make necessary changes and use the below code.

$ sudo apt-get install gparted mbr dosfstools p7zip syslinux && cd /media/username/XFCE && 7z x /home/username/downloads/bl-Helium_amd64+build2.iso && mv isolinux syslinux && mv syslinux/isolinux.cfg syslinux/syslinux.cfg && mv syslinux/isolinux.bin syslinux/syslinux.bin && sed -i 's/\(append boot=.*\)$/\1 persistence/' syslinux/live.cfg && sudo chown username /media/username/persistence && cd /media/username/persistence && echo / union > persistence.conf && cd && umount /media/username/XFCE && umount /media/username/persistence && sudo /sbin/install-mbr /dev/sdX && sudo syslinux -i /dev/sdX1

When executing in a single command, if you come across an error, the error message might help you identify the command which prompted the error. Eg, install-mbr: Failed to open /dev/sdc: Permission denied is associated with the command /sbin/install-mbr /dev/sdc. In such a case, fix the issue and re-execute that particular code along with the rest of the code.

sudo /sbin/install-mbr /dev/sdc && sudo syslinux -i /dev/sdc1

---------------------------------------------------------------
||~ WIFI SLOW AFTER UPGRADING THE PACKAGES ~||
```````````````````````````````````````````````````````````````````````````````
Once boot into the live system, it is a general ritual to update and upgrade the packages.

$ sudo apt update
$ sudo apt upgrade

There is a good possibility that your wifi will be frustratingly slow after you have upgraded the packages. This is because of the package linux-image-4.9.0-6-amd64 that is upgraded during the previous process. Do apt list --upgradable before upgrading and you can  find this package.

You can do two things here,

  1. Exclude linux-image-4.9.0-6-amd64 from being upgraded using sudo apt-mark hold linux-image-4.9.0-6-amd64

  2. Or, if you choose to upgrade the package, after upgrading, make a config file as follows,

    $ sudo nano /etc/modprobe.d/iwlwifi.conf

    and add the following line into the config file,

    options iwlwifi 11n_disable=8

    Save the config file and reboot the system.
    Reference: https://bugs.debian.org/cgi-bin/bugrepo … bug=884426

Last edited by linux_user (2018-10-22 12:50:00)

Offline

#2 2018-10-15 20:57:16

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

Hello. Followed the tutorial, but could not get persistence.
Here's what was done:
1. Partitioned 64G tf card. GPT filesystem with 1.5G fat32 with boot flag + persistence for the rest.
2. Extracted the iso to fat32 partition and renamed isolinux folder and files to syslinux.
3. Added persistence to live.cfg
4. Created persistence.conf on the second partition and added / union.

USB booted, but no persistence.

Offline

#3 2018-10-15 21:38:17

cloverskull
Member
Registered: 2015-10-01
Posts: 301

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

I still think there's an easier way to install BL with persistence. Use virtualbox, and expose the USB drive to the VM. Treat the USB drive like the target install disk. Don't install any VirtualBox additions.

Once you've installed everything, shut down the VM and reboot your computer, booting from the USB drive. You'll now be in a fully installed, persistent BL.

The only caveat here is to pay attention when configuring your VM to use EFI when appropriate, otherwise you'll have a borked bootloader.

Offline

#4 2018-10-16 17:46:49

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

The problem is that it ties itself to a hardware and cannot be used on another machine. If I try to boot it on another machine I get 11027.jpg

Last edited by rgnr (2018-10-16 17:48:39)

Offline

#5 2018-10-16 19:13:19

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

Update. I've ran again with the tutorial and successfully created persistence live usb. Guess it msdos filesystem was mandatory, I used gpt. Also I missed chown step. Anyways, explanation of the steps would be nice to see.

Offline

#6 2018-10-17 06:22:01

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

rgnr wrote:

Update. I've ran again with the tutorial and successfully created persistence live usb. Guess it msdos filesystem was mandatory, I used gpt. Also I missed chown step. Anyways, explanation of the steps would be nice to see.


Glad it did. The explanation to most of the steps are in the original tutorial (the first link of the post). Hence ignored the steps and choose a step by step instruction.

I have also added the step of creating a new msdos partition table on the device. During the original post I presumed that user would do it.

Last edited by linux_user (2018-10-17 06:27:34)

Offline

#7 2018-10-17 07:21:59

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

There's also a tutorial on creating UEFI live usb with persistence.

parted /dev/sdX --script mkpart EFI fat16 1MiB 10MiB
parted /dev/sdX --script mkpart live fat16 10MiB 3GiB

Does that mean that there are to EFI partitions and two live partitions? What for? There's no explanation to this in the tutorial. As well as to the sizing.

UPD. The tutorial works.

Last edited by rgnr (2018-10-17 19:45:33)

Offline

#8 2018-10-19 10:07:55

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

I haven't tried that tutorial since I wanted Legacy and not UEFI booting. However looking at that tutorial, there is this explanation:

We need an EFI boot partition for UEFI PCs to boot from the USB drive. Then we need a sufficiently large partition to hold the original live ISO filesystem image contents. That partition must have the legacy_boot flag set. Then we add the persistence partition, using up all the remaining space of the USB drive. You can do that with any GPT capable partitioning tool (mind the legacy_boot flag).

Therefore the lines you quoted does not create two EFI partitions and two live partitions.

parted /dev/sdX --script mkpart EFI fat16 1MiB 10MiB - This creates the the EFI boot partition in the first 10MBs of the disk
parted /dev/sdX --script mkpart live fat16 10MiB 3GiB - This creates a second partition to hold the live image from 10thMB to 3rdGB of the disk's.
parted /dev/sdX --script mkpart persistence ext4 3GiB 100% - This creates the persistent partition from 3rdGB to the rest of the size (100%).

Offline

#9 2018-10-20 04:27:35

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

linux_user wrote:

I haven't tried that tutorial since I wanted Legacy and not UEFI booting. However looking at that tutorial, there is this explanation:

We need an EFI boot partition for UEFI PCs to boot from the USB drive. Then we need a sufficiently large partition to hold the original live ISO filesystem image contents. That partition must have the legacy_boot flag set. Then we add the persistence partition, using up all the remaining space of the USB drive. You can do that with any GPT capable partitioning tool (mind the legacy_boot flag).

Therefore the lines you quoted does not create two EFI partitions and two live partitions.

parted /dev/sdX --script mkpart EFI fat16 1MiB 10MiB - This creates the the EFI boot partition in the first 10MBs of the disk
parted /dev/sdX --script mkpart live fat16 10MiB 3GiB - This creates a second partition to hold the live image from 10thMB to 3rdGB of the disk's.
parted /dev/sdX --script mkpart persistence ext4 3GiB 100% - This creates the persistent partition from 3rdGB to the rest of the size (100%).

Thanx for explanation smile So 10MB is enough for EFI? Mostly 100MB is the recomended minimum, some use even 512MB.

Offline

#10 2018-10-20 12:28:48

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

rgnr wrote:
linux_user wrote:

I haven't tried that tutorial since I wanted Legacy and not UEFI booting. However looking at that tutorial, there is this explanation:

We need an EFI boot partition for UEFI PCs to boot from the USB drive. Then we need a sufficiently large partition to hold the original live ISO filesystem image contents. That partition must have the legacy_boot flag set. Then we add the persistence partition, using up all the remaining space of the USB drive. You can do that with any GPT capable partitioning tool (mind the legacy_boot flag).

Therefore the lines you quoted does not create two EFI partitions and two live partitions.

parted /dev/sdX --script mkpart EFI fat16 1MiB 10MiB - This creates the the EFI boot partition in the first 10MBs of the disk
parted /dev/sdX --script mkpart live fat16 10MiB 3GiB - This creates a second partition to hold the live image from 10thMB to 3rdGB of the disk's.
parted /dev/sdX --script mkpart persistence ext4 3GiB 100% - This creates the persistent partition from 3rdGB to the rest of the size (100%).

Thanx for explanation smile So 10MB is enough for EFI? Mostly 100MB is the recomended minimum, some use even 512MB.

In all honestly, I am not sure of that. I guess someone with better expertise can shed some light on it.

Offline

#11 2018-10-20 17:57:22

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

Well, not a big deal anywayz. With today drives space is not a problem. Did 100MB for EFI, 1.5GB for live and the rest for persistent. 64GB uefi persistent flash drive was successfully created and booted.

Offline

#12 2018-10-22 12:49:29

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

rgnr wrote:

Well, not a big deal anywayz. With today drives space is not a problem. Did 100MB for EFI, 1.5GB for live and the rest for persistent. 64GB uefi persistent flash drive was successfully created and booted.

That's nice to know. I should try that tutorial as well.

Offline

#13 2018-11-04 04:22:34

manuel-909
Member
Registered: 2017-10-09
Posts: 54

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

ok little help when i boot the usb i got MBR FA:

Last edited by manuel-909 (2018-11-04 04:23:17)

Offline

#14 2018-11-04 05:11:27

manuel-909
Member
Registered: 2017-10-09
Posts: 54

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

never mind i forgot to tick the boot option but still no persistence.....

Offline

#15 2018-11-05 07:43:30

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

manuel-909 wrote:

never mind i forgot to tick the boot option but still no persistence.....

It should work, perhaps some codes are executed with a typo. Please make sure that your mount points are correct and your username is correct too.

Please make sure that you're booting to the legacy version (grub will have bunsenlabs logo and options, somewhat like this) and not the UEFI version (Grub background will be blue in color with white font, somewhat like this). If your computer boots to the UEFI version, your OS will not be persistent in any way.

Last edited by linux_user (2018-11-06 19:44:28)

Offline

#16 2018-11-06 18:28:41

rodolforizzo76
New Member
From: Italia
Registered: 2018-11-06
Posts: 1
Website

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

Good morning, thanks for the tutorial, but I would like to get persistence even for the installed programs, instead after the restart there are no more. How can it be done?

Offline

#17 2018-11-06 18:45:35

damo
....moderator....
Registered: 2015-08-20
Posts: 4,378

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

rodolforizzo76 wrote:

Good morning, thanks for the tutorial, but I would like to get persistence even for the installed programs, instead after the restart there are no more. How can it be done?

I suggest you open a new thread in 'Help & Support', and give details of what you have done so far. Without further information it would be difficult to give you an answer.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#18 2018-11-06 19:35:11

linux_user
Member
Registered: 2016-11-04
Posts: 226

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

rodolforizzo76 wrote:

Good morning, thanks for the tutorial, but I would like to get persistence even for the installed programs, instead after the restart there are no more. How can it be done?

The tutorial gives persistence to all aspects, including installed programs, preferences of installed programs and even downloaded files.


Please make sure that you're booting to the legacy version (grub will have bunsenlabs logo and options, somewhat like this) and not the UEFI version (Grub background will be blue in color with white font, somewhat like this). If your computer boots to the UEFI version, your OS will not be persistent in any way.

Last edited by linux_user (2018-11-06 19:44:43)

Offline

#19 2018-11-12 06:57:38

rgnr
Member
Registered: 2015-11-13
Posts: 40

Re: [Tutorial] Making a legacy persistent Bunsenlabs Helium USB stick

Update. For UEFI boot there's no need to create EFI partition and install syslinux.

Offline

Board footer

Powered by FluxBB