LiveUsbPendrivePersistent
6171
Comment:
|
7412
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
It is possible to have Ubuntu on a USB pendrive with persistent mode. This means that you can boot from a USB pendrive and keep customisations such as keyboard layout, numlock, preferences, additional packages saved on the pendrive. This can be done using linux or windows. You will need a USB pendrive of 1 GB or more. This page is written after having tested the instructions on a Peak III 1 GB pendrive. The preparation of the pendrive is explained using 'fdisk' because I had errors with 'gparted' and i could not give the partitions a volume name. |
It is possible to have Ubuntu or Kubuntu on a USB pendrive with persistent mode. This means that you can boot from a USB pendrive and keep customisations such as keyboard layout, numlock, preferences, additional packages saved on the pendrive. This can be done using linux or windows. You will need a USB pendrive of 1 GB or more. This page is written after having tested the instructions on a Peak III 1 GB pendrive. The preparation of the pendrive is explained using 'fdisk' because I had errors with 'gparted' and i could not give the partitions a volume name. I used Ubuntu to make the pendrive. In Kubuntu it is more or less the same. Where you see 'ubuntu' replace it by 'kubuntu'. I will mark the other differences. |
Line 99: | Line 99: |
DEFAULT /casper/vmlinuz | DEFAULT custom |
Line 101: | Line 101: |
GFXBOOT-BACKGROUND 0xB6875A APPEND boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
APPEND preseed/file=preseed/ltsp.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL custom menu label ^Start Ubuntu in persistent mode kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
Line 105: | Line 108: |
kernel /casper/vmlinuz append boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
Line 109: | Line 112: |
kernel /casper/vmlinuz append boot=casper xforcevesa initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper xforcevesa initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
Line 113: | Line 116: |
kernel /casper/vmlinuz append boot=casper integrity-check initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
kernel vmlinuz append boot=casper integrity-check initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- |
Line 117: | Line 120: |
kernel /install/mt86plus | kernel mt86plus |
Line 136: | Line 139: |
Line 137: | Line 141: |
You can also copy and paste this text as making a new file 'syslinux.cfg'. Kubuntu difference : text editor 'kwrite' instead of 'gedit'. Kubuntu difference : replace 'preseed/ltsp.seed' by 'preseed/kubuntu.seed'. The last thing to do is installing the bootloader. Check if you have the 'syslinux' package installed. If not install it ('sudo synaptic' and select from the package list or use 'apt-get'). This command will install the bootloader on your pendrive : {{{ syslinux /dev/sda1 }}} Reboot on the pendrive, change some settings, reboot again and check if the changes are kept (persistence check). So that is it. Do not forget to check if the computer you are going to use the pendrive on if it boots USB devices first (look in BIOS settings). Enjoy (k)ubuntu whereever you go. = Installing Ubuntu on USB pendrive using Windows = |
Page under construction.
Introduction
It is possible to have Ubuntu or Kubuntu on a USB pendrive with persistent mode. This means that you can boot from a USB pendrive and keep customisations such as keyboard layout, numlock, preferences, additional packages saved on the pendrive. This can be done using linux or windows. You will need a USB pendrive of 1 GB or more. This page is written after having tested the instructions on a Peak III 1 GB pendrive. The preparation of the pendrive is explained using 'fdisk' because I had errors with 'gparted' and i could not give the partitions a volume name. I used Ubuntu to make the pendrive. In Kubuntu it is more or less the same. Where you see 'ubuntu' replace it by 'kubuntu'. I will mark the other differences.
Installing Ubuntu on USB pendrive using Linux
Preparing the USB pendrive
Making partitions
The preparation of the pendrive is explained using 'fdisk'. You could use 'gparted' or 'qtparted' as well. However I had errors with 'gparted' and I could not give the partitions a volume name. I tested 'qtparted' as well and it worked fine. You can install 'qtparted' under Ubuntu through synaptic although it is native to Kubuntu. Another issue in my case was that 'fdisk' recognised a fat32 filesystem as linux. So I checked it with gparted and it was OK.
Plug in the pendrive and check its device name :
sudo fdisk -l
We are going to suppose that its name is /dev/sda1. Please replace 'sda1' by 'the name you find for your pen drive'. Double check it !
Now we are going to create 2 partitions : 1 partition of 700 MB with a fat32 filesystem and 1 partition with the rest of the pendrive space with volume name "casper-rw" and ext2 filesystem. The first partition will be made active.
Go in terminal and unmount the drive :
sudo umount /dev/sda
Fire up fdisk for the pendrive :
sudo fdisk /dev/sda1
This will give you the fdisk prompt. Look to what you have on the pendrive. Check if you have to backup the data you have on it. 'p' will print the content of /dev/sda. If you have partitions on it remove them ('d', 'partition number', 'w'). Make partition 1 : 'n' for new partition, 'p' to make it a primary partition, then just press enter to accept the proposed starting cylinder, '+700M' to make its size 700 MB. Then 'a' to make it the active partition. Make partition 2 : 'n' for new partition, 'p' to make it a primary partition, then just press enter to accept the proposed starting cylinder, then press enter to accept the proposed ending cylinder. Save and quit fdisk with 'w' to write the new settings. Check the result : sudo fdisk -l You should see the 2 partitions with the first marked with a * because it is active.
Formatting the partitions
We will now format the partitions by putting a filesystem on and giving them the name 'dapper' (or any other name you want) and 'casper-rw' (this name is MANDATORY, do not change other names and do not use capital letters) :
sudo mkfs.vfat -F 32 -n dapper /dev/sda1 sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sda2
Mount the partitions on the pendrive. Take out the pendrive and put it back. Ubuntu Dapper will mount the pendrive automatically if you have checked this option under System -->Preferences--> Removable media. Otherwise use 'mount' :
sudo mount /dev/sda1 /media/mountpointyouhave1 sudo mount /dev/sda1 /media/mountpointyouhave2
Installing Dapper on the USB pendrive
Download the dapper image (ubuntu-6.06-desktop-i386.iso) or put in the install CD if you have it. If you use the downloaded image you can access it as follows (supposing that the image is in the path you are working in):
mkdir ubuntuCD sudo mount ubuntu-6.06-desktop-i386.iso ubuntuCD -o loop
Now put in the CD or open the 'ubuntuCD' and make sure that you see the hidden files too. (verify if View-->Show Hidden Files is checked).
Copy the following folders and files to the 1st partition of your USB pendrive :
Folders : 'casper', 'disktree', 'dists', 'install', 'pics', 'pool', 'preseed', 'programs', '.disk'
Files : all files from the folder 'isolinux', 'md5sum.txt', 'README.diskdefines', 'ubuntu.ico'
So you do not copy the folder 'isolinux' on the pendrive but only its contents directly in the root of the first partition of the pendrive.
Copy 'casper/vmlinuz', 'casper/initrd.gz', 'install/md86plus'. So you will have these files double on the pendrive : once in the root '/' of the partition and once in the folder 'casper' or 'install'.
Rename the file 'isolinux.cfg' to 'syslinux.cfg' either by right clicking on it and selecting 'rename' or in terminal :
rename isolinux.cfg syslinux.cfg
Making the pendrivebootable
We are going to install the linux bootloader 'syslinux'. This bootloader needs a configuration file which is 'syslinux.cfg'. This is the file we just made by renaming 'isolinux.cfg' from the installCD. However we have to modify this file. Open the file 'syslinux.cfg' from the pendrive with your favorite texteditor. For instance :
gedit syslinux.cfg
Adapt the content untill you get this :
DEFAULT custom GFXBOOT bootlogo APPEND preseed/file=preseed/ltsp.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL custom menu label ^Start Ubuntu in persistent mode kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL live menu label ^Start or install Ubuntu kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL xforcevesa menu label Start Ubuntu in safe ^graphics mode kernel vmlinuz append preseed/file=preseed/ltsp.seed boot=casper xforcevesa initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL check menu label ^Check CD for defects kernel vmlinuz append boot=casper integrity-check initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash -- LABEL memtest menu label ^Memory test kernel mt86plus append - LABEL hd menu label ^Boot from first hard disk localboot 0x80 append - DISPLAY isolinux.txt TIMEOUT 300 PROMPT 1 F1 f1.txt F2 f2.txt F3 f3.txt F4 f4.txt F5 f5.txt F6 f6.txt F7 f7.txt F8 f8.txt F9 f9.txt F0 f10.txt
You can also copy and paste this text as making a new file 'syslinux.cfg'. Kubuntu difference : text editor 'kwrite' instead of 'gedit'. Kubuntu difference : replace 'preseed/ltsp.seed' by 'preseed/kubuntu.seed'.
The last thing to do is installing the bootloader. Check if you have the 'syslinux' package installed. If not install it ('sudo synaptic' and select from the package list or use 'apt-get'). This command will install the bootloader on your pendrive :
syslinux /dev/sda1
Reboot on the pendrive, change some settings, reboot again and check if the changes are kept (persistence check).
So that is it.
Do not forget to check if the computer you are going to use the pendrive on if it boots USB devices first (look in BIOS settings). Enjoy (k)ubuntu whereever you go.
Installing Ubuntu on USB pendrive using Windows
LiveUsbPendrivePersistent (last edited 2017-04-30 18:13:47 by es20490446e)