Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What is the best way to put Debian live rescue on a stick?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
bartveurink
Posts: 21
Joined: 2013-09-03 15:21

What is the best way to put Debian live rescue on a stick?

#1 Post by bartveurink »

What is the best way to put Debian live rescue 7 on a USB-stick? 'dd' creates 1 partition with the live os. The rest is not used. The partition is complety full, so I cant update the system. Can I enlarge the partion to whole disk. without losing the partition. Otherwise, I must use another program.
UNetbootin uses the whole disk as one partition. There is free space on. But, I dont like the bootmenu. The first option is Default. What does not work. The second is for failsafe. UNetbootin is also not a good way!
I want to update/upgrade the distribution with apt-get. Is that possible?
Bart Veurink

User avatar
unicornswag
Posts: 149
Joined: 2013-05-31 16:09
Location: Wisconsin, US

Re: What is the best way to put Debian live rescue on a stic

#2 Post by unicornswag »

So, essentially what you want to do is make a "persistent" live usb stick? If I were you, this is what I would do:

1. Burn a cd of either a live or installation image of Debian.

2. Boot from that cd.

3. Insert the usb drive you want to use as your recovery disk.

4.Run through the installer from your debian cd, and when asked to select the drive to install to, simply select your usb stick and tell it to wipe all partitions and use the entire disk.

When the installation is done, you will have a fully functional installation of debian on your usb drive that you can boot from at any time. All changes made will be persistent after reboot. I have used this method several times and it works quite well.

My only question is why you would want this "recovery" disk to have persistence? Normally all that's really required for a recovery session is a basic console to copy/edit files. Are you planning on installing gparted or some other utilties?
Debian 7.1 Wheezy KDE / DWM

2001 600 mhz iMac G3


Ubuntu: An ancient African word meaning "I can't configure Debian."

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: What is the best way to put Debian live rescue on a stic

#3 Post by kiyop »

If you want to update/upgrade packages especially kernel, boot debian installer and install to a partition in your USB media different from the booted media with similar usual installation method to a partition in an internal HDD.

I have a 8GB USB flash (thumb) where I installed debian with the above method. With it, I can boot openbox. Do not install large package like GNOME or KDE. For rescue tool, openbox is enough. If you don't need GUI, you can omit xorg and desktop environments and window managers.

But I heard that the debian installed with this method (usual installation method) writes often to the USB flash than that installed with "Copying ISO" method which uses a squashfs file. Writing often to the USB media may damage the USB flash more.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

dibl
Posts: 528
Joined: 2009-10-13 19:50
Location: Dayton, Ohio, USA

Re: What is the best way to put Debian live rescue on a stic

#4 Post by dibl »

kiyop wrote:
But I heard that the debian installed with this method (usual installation method) writes often to the USB flash than that installed with "Copying ISO" method which uses a squashfs file. Writing often to the USB media may damage the USB flash more.
This problem is easily solved -- just use a "commit=xxx" option on the mount line in /etc/fstab, where "xxx" is the time, in seconds, between journal commits. The same technique can be used on a SSD, if there is concern about ext4 journal commits happening every 5 seconds. Example:

Code: Select all

UUID=5bb73cb6-5aaf-4bb5-a0a2-7129c21115b3     /    ext4         defaults,noatime,discard,commit=120,errors=remount-ro     0    1
Of course the tradeoff is the reliability of the filesystem, in the event of a power loss, but a USB stick would not seem to be a place for mission-critical data with 24/7 availability.
Debian sid / siduction KDE

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: What is the best way to put Debian live rescue on a stic

#5 Post by kiyop »

Thanks dibl. :)
I will try.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply