This siteAll blogsLe 17ClémentCCBCuisineLe 3ContactSe connecterS'inscrire
  • All blogs
  • Le 17
  • Clément
  • CCB
  • Cuisine
  • Le 3
  • Contact

  • S'inscrire

Recettes informatiques

  • Page de garde
  • Contact
  • Se connecter
  • « Migrate from mbox to MailDir
  • LDAP and PAM authentification »

Create a Debian install USB key without erasing data (Squeeze 6.0.5)

Posted by mazet on Sep 19 2012 in Debian

Install syslinux installer on your system. If you're using a Debian Linux, just type:

Shell

sudo aptitude install syslinux

Let's say that the associated device of the USB key is /dev/sdb. Install syslinux boot loader on your USB key.

Shell

sudo syslinux --install /dev/sdb

Mount USB key.

Shell

sudo mount /dev/sdb1 /media/usbkey

Download Debian installer from SNT

Shell

wget http://ftp.nl.debian.org/debian/dists/stable/main/installer-i386/current/images/cdrom/gtk/initrd.gz -O /media/usbkey/gtk-initrd.gz
wget http://ftp.nl.debian.org/debian/dists/stable/main/installer-i386/current/images/cdrom/initrd.gz -O /media/usbkey/initrd.gz
wget http://ftp.nl.debian.org/debian/dists/stable/main/installer-i386/current/images/cdrom/vmlinuz -O /media/usbkey/vmlinuz

Download latest business card image from CD image.

Shell

wget http://cdimage.debian.org/debian-cd/current/i386/iso-cd/debian-6.0.5-i386-businesscard.iso

Mount it and copy .disk, dists and pool

Shell

mkdir image
sudo mount -t iso9660 -o loop debian-6.0.5-i386-businesscard.iso image
cp -r image/{.disk,dists,pool} /media/usbkey
sudo umount image
rmdir image

You don't need anymore the Debian image, thus you can remove it.

Shell

rm debian-6.0.5-i386-businesscard.iso

Create boot menu.

Shell

cp /usr/lib/syslinux/menu.c32 /media/usbkey
cat > /media/usbkey/syslinux.cfg <<EOF
DEFAULT debian-gui
UI menu.c32
PROMPT 0
TIMEOUT 0
 
MENU TITLE Debian GNU/Linux i386 6.0.5
MENU WIDTH 78
MENU MARGIN 6
MENU VSHIFT 1
MENU ROWS 13
MENU TABMSGROW 19
MENU HELPMSGROW 21
MENU TABMSG Press ENTER to boot or TAB to edit.
MENU CMDLINEROW 22
 
LABEL debian-txt
    MENU LABEL Install
    LINUX vmlinuz
    APPEND vga=788 initrd=initrd.gz -- quiet 
 
LABEL debian-rescue-txt
    MENU LABEL Rescue mode
    LINUX vmlinuz
    APPEND vga=788 initrd=initrd.gz rescue/enable=true -- quiet 
 
LABEL debian-gui
    MENU LABEL Graphical install
    LINUX vmlinuz
    APPEND video=vesa:ywrap,mtrr vga=788 initrd=gtk-initrd.gz -- quiet
 
LABEL debian-rescue-gui
    MENU label Graphical rescue mode
    KERNEL vmlinuz
    APPEND video=vesa:ywrap,mtrr vga=788 initrd=gtk-initrd.gz rescue/enable=true -- quiet
 
EOF

That's it!

Shell

sudo umount /media/usbkey
This entry was posted by mazet and filed under Debian.

No feedback yet

Catégories

  • Toutes
  • Non catégorisé
  • Programmation
    • Awk
    • Bash
    • C
    • C++
    • Javascript
    • LaTeX
    • Perl
    • Tcl/Tk
  • Systeme
    • Android
    • Debian
    • Ubuntu

Contenu

  • Linux Router
  • Creating a network between 2 virtual machines on Windows with Qemu
  • Build a Debian package for pdmenu
  • Extract informations from epub file
  • Connexion PostgreSql / Java par Socket Unix
  • Example of fork and respawn
  • Start SSH daemon on Git portable distribution
  • Create a git mirror
  • Color diff
  • Create on Debian a Minecraft server
  • GIT/HG/SVN on multiple repos simultaneously
  • Convert Comics into CBZ format
  • Random password generator function
  • Convert to camelCase
  • DKIM and SPF
  • Migration from BackupPC 3 (Debian package) to BackupPC 4 (Standalone Installation)
  • Minimal BC for Mingw
  • Diskless Debian cluster
  • Colorize log file
  • Generate certificates with (or without) a certificate authority
Août 2025
Lun Mar Mer Jeu Ven Sam Dim
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 << <   > >>
  • Accueil
  • Récemment
  • Archives
  • Catégories
  • Derniers commentaires

Rechercher

Flux XML

  • RSS 2.0: Posts
  • Atom: Posts
What is RSS?

©2025 by Laurent Mazet • Contact • Aide • CMS + user community

Web Site Builder

Cookies are required to enable core site functionality.