create a bootable stick from a system ?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
PGTART
Level 1
Level 1
Posts: 3
Joined: Sun Sep 15, 2013 6:35 am

create a bootable stick from a system ?

Post by PGTART » Thu Sep 19, 2013 2:58 pm

Now that i finally got it all working using the right drivers settings and removed unwanted software and added some new software which i have configured too.
I am wondering can create from this system a bootable stick version of it (hopefully preferring the same settings)

if thats possible what software should i use ?

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4581
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: create a bootable stick from a system ?

Post by Aging Technogeek » Thu Sep 19, 2013 6:47 pm

This should do the job.

[url]http://clonezilla.org/[/url]
Registered Linux User 483387

User avatar
WharfRat
Level 20
Level 20
Posts: 11688
Joined: Thu Apr 07, 2011 8:15 pm

Re: create a bootable stick from a system ?

Post by WharfRat » Thu Sep 19, 2013 7:14 pm

PGTART,

I did the exact same thing using rsync because the flash drive had much less space than the partition it was installed on so I couldn't just clone the partition.
ImageImage

geoffm
Level 3
Level 3
Posts: 113
Joined: Thu Jul 16, 2009 8:34 am
Location: Quebec, Canada

Re: create a bootable stick from a system ?

Post by geoffm » Thu Sep 19, 2013 8:37 pm

WharfRat wrote:PGTART,

I did the exact same thing using rsync because the flash drive had much less space than the partition it was installed on so I couldn't just clone the partition.
Did it boot properly?
Would there be a difference between using rsyng and cp ?
Custom build w/ Gigabyte Z87MX-D3h | Intel Core i5 4670 | 8GB DD3 | 250GB SSD

User avatar
WharfRat
Level 20
Level 20
Posts: 11688
Joined: Thu Apr 07, 2011 8:15 pm

Re: create a bootable stick from a system ?

Post by WharfRat » Thu Sep 19, 2013 9:15 pm

geoffm wrote:Did it boot properly?
Would there be a difference between using rsyng and cp ?
It did boot, but using rsync you would need to chroot to the flash drive to install grub to /dev/sdd or whatever your flash drive is assigned when you plug it in and update the initramfs.

Also you have to change the the UUID assignments in /etc/fstab as obviously they will be different than the system you copied the files from.

If you use dd or clonezilla then you would still have to install and update grub on the flash, but since the UUID assignments would be preserved you wouldn't have to change anything in fstab.

This is how I did it - I have a separate home partition on the hard drive, but I included it in the '/' tree on the flash. You would setup your '/' and swap partition on the flash drive then:

Code: Select all

mkdir /mnt/disk
mkdir /mnt/disk/home
mkdir /mnt/flash

Code: Select all

mount /dev/sdg1 /mnt/flash
mount /dev/sdb9 /mnt/disk
mount /dev/sdb10 /mnt/disk/home

Code: Select all

rsync -aiu  --exclude={'/proc','/dev','/media','/mnt','/sys','/tmp'}  /mnt/disk/ /mnt/flash/
mkdir {/mnt/flash/proc,/mnt/flash/dev,/mnt/flash/media,/mnt/flash/mnt,/mnt/flash/sys,/mnt/flash/tmp}
chmod 1777 /mnt/flash/tmp

Code: Select all

mount -t proc none /mnt/flash/proc
mount --rbind /sys /mnt/flash/sys
mount --rbind /dev /mnt/flash/dev
/usr/sbin/chroot /mnt/flash /bin/bash
source /etc/profile
export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](flash) #\[\e[0m\] "

Code: Select all

/usr/sbin/grub-install /dev/sdg
/usr/sbin/update-grub
update-initramfs -uv 

Code: Select all

umount /mnt/disk/home
umount /mnt/disk
umount /mnt/flash
Then I updated /etc/fstab from the output of blkid.
ImageImage

Post Reply

Return to “Software & Applications”