Translations: [:DebianEeePC/HowTo/InstallOnSDcardOrUsbStick:Anglais]


Les capacités limitées de l'asus EeePC ne sont pas adéquats pour garder plusieurs systèmes d'exploitation sur le disque flash interne. Une carte SD ou SDHC (qui peut toujours rester dans le lecteur de carte) ou une clé USB peuvent être des médias sur lequel on peut installer un autre système et avoir un espace de stockage plus grand. Cette page de wiki vous donne les instructions pour savoir comment faire ceci.

Cette version de la page dépend beaucoup de la version courante du noyau, de l'installateur et de ce type là; les détails changeront probablement dans le future. N'hésitez pas à éditer si besoin est.

Les inconvénients

Un système sur un média externe flash peut être pratique et utile. Il y a quelques inconvénients, bien sûr :

Installation on external flash drive: overview

Installing on SD cards or external flash drives

Starting installation

  1. Put the stick with the installer in the USB port on the left side.
  2. Press <esc> while booting and select the stick to boot from.

  3. Now put the SD or SDHC card into the built in reader. If you want to install to a USB stick put that one in the second USB port on the right side, the one that is closer to the display.
  4. Start installation until partitioning. Select manual partitioning.

Partitioning a SD card or USB stick and mounting it

  1. Spot the device you want to install to: the internal card reader is easy to find, the stick might show a brand label, size or something else from which you can tell which stick is which. If you have no clue, then assume the installer stick is on /dev/sdb1 and the target stick on /dev/sdc1 (if you did put it into the USB ports I told you to).

  2. Write the name of the device down (It's very likely /dev/sdc1 with the current installer). You will need that device name later to know where to install the bootloader.

  3. On a pristine stick or card you will see one fat partition, select and delete it.

  4. Now you will see free space. Select that, and create a new primary partition. Accept the default size to use the whole medium. You could leave space for a swap partition, but on a flash device it might be quite reasonable not to have a swap partition. The installer will protest, but you can safely proceed without. (If your machine allows it, you should consider adding more RAM instead.)

  5. Filesystem default ext3 is fine. Select mount option noatime (relatime does not work yet).

  6. I would set a volume label like eeeSDcard or eeeStick.

  7. Set the bootable flag.

  8. Select 'Done setting up partition' and 'Finish partitioning and write changes to disk'.
  9. The installer starts to protest that you should have a swap partition, but you can safely continue without. There will be more warnings about missing swap later on, so just keep your own opinion.

Installing the GRUB bootloader on an SD card or an USB stick

  1. Now let the installer do its thing until it wants to write the GRUB bootloader. Stop now. Do not install the GRUB bootloader in the MBR.

  2. To install the bootloader on your external media you have to give the name of the device as the installer sees it during installation. So install it to the device (without partition number) you wrote down in the partitioner. Probably it will be /dev/sdc (*NOT* /dev/sdc1).

    • You can double check this by switching to console 2 (press <ctr> + <alt> + <F2> and then <ret>) and use the 'mount' command. It's the device where /target is mounted (without partition number). Switch back to the installer by pressing <ctr> + <alt> + <F1>.

    • You install GRUB on a device like /dev/sdc but this will show up as /dev/sdb when the system gets booted. Don't get confused, it is confusing. ;-)

Fixing GRUB configuration and /etc/fstab

  1. Continue until the installer wants to reboot, but don't do that yet. We must correct the faulty disk and device names in /boot/grub/menu.lst and /etc/fstab first. You can do that inside the installer now, or you can decide to let the installer finish and mount the media somewhere else to fix things there before rebooting the Eee. Next steps show how to do it in the installer.

  2. Switch to console 2 (<ctr> + <alt> + <F2>).

  3. The root of the installed system is mounted under /target during the instal. So if you edit the files during installation make sure to edit the copy in the /target/ hierarchy! The other files in the root filesystem are in the ramdisk and will be gone when you´ll reboot. Make a security copy, something like

  4.   cp -a /target/boot/grub/menu.lst /target/boot/grub/menu.lst.INSTALLER.back
      cp -a /target/etc/fstab /target/etc/fstab.INSTALLER.back
  5. Check and edit the drive letter in /target/etc/fstab. / should be mounted on /dev/sdb1 (not /dev/sdc1)

      nano /target/etc/fstab
    it should look like this:
     /dev/sdb1    /    ext3    noatime,errors=remount-ro    0  1

    Or even better, see http://www.cyrius.com/debian/nslu2/linux-on-flash.html

     /dev/sdb1    /    ext3    noatime,commit=120,errors=remount-ro    0  1
  6. Edit /target/boot/grub/menu.lst. The external media root should be on (hd0,0). Scroll down until you see the entries for the installed system, it looks similar to this:

    ## ## End Default Options ##
    title           Debian GNU/Linux, kernel 2.6.24-1-686
    root            (hd2,0)
    kernel          /boot/vmlinuz-2.6.24-1-686 root=/dev/sdc1 ro quiet
    initrd          /boot/initrd.img-2.6.24-1-686

    Now change to 'root (hd0,0)' and '/dev/sdb1'. With my kernel version it looks like:

    title           Debian GNU/Linux, kernel 2.6.24-1-686
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.24-1-686 root=/dev/sdb1 ro quiet
    initrd          /boot/initrd.img-2.6.24-1-686
    title           Debian GNU/Linux, kernel 2.6.24-1-686 (single-user mode)
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.24-1-686 root=/dev/sdb1 ro single
    initrd          /boot/initrd.img-2.6.24-1-686

    The internal flash drive should be on (hd1,0) and /dev/sda(x). So for default xandros on the internal drive you would edit the entries (farther down) to look something like this:

    # This entry automatically added by the Debian installer for an existing
    # linux installation on /dev/sda1.
    title           Normal Boot (on /dev/sda1)
    root            (hd1,0)
    kernel          /boot/vmlinuz- quiet rw vga=785 irqpoll root=/dev/sda1
    initrd          /boot/initramfs-eeepc.img

    Now we must correct the entries for update-grub. They look like comments in the first part of the same file. Edit the device in the kernel options to /dev/sdb1.

    # kopt=root=/dev/sdb1 ro

    and GRUBs root to (hd0,0)

    # groot=(hd0,0)
  7. Now change back to console 1 (<ctr> + <alt> + <F1>) and let the installer reboot.

See [#booting Booting external media] for methods how to boot later.

Fixing uswusp configuration

Inhibiting suspend

Probably we will have a better method of avoiding suspend, see 474531.


Booting external media

Common case

Booting from SDHC card