Mandriva One USB – Eng

This is a very short howto turn a mandriva one (KDE or GNOME) into a bootable USB device.

New: See this article for enabling persistence.

How to prepare the USB key to receive mandriva one

USB key are often initialised with a strange partition table. This must be corrected to install mandriva one and be ab le to boot.

With Linux

Use the fdisk partitionning tool to remove former partitions, create a new one and make it bootable.
First identify the device of the USB key with cat /proc/partitions. Let say it’s /dev/sdc.

major minor  #blocks  name

   8     0    3907512 sda
   8     1    3903763 sda1
   7     0     990320 loop0
   8    32    4029952 sdc
   8    33    4024251 sdc1

Launch fdisk this way :

fdisk /dev/sdc

Use the d commande to delete former partition until there are no more partition left. Be aware that it will erase data on your USB Key!

Use the n commande to create a new partition (example are in french but you should have similar results in english, I don’t have an english configuration but feel free to send me your results):

Commande (m pour l'aide): n
Action de commande
   e   étendue
   p   partition primaire (1-4)
p
Numéro de partition (1-4): 1
Premier cylindre (1-501, par défaut 1): (just type return)
Utilisation de la valeur par défaut 1
Dernier cylindre ou +taille or +tailleM ou +tailleK (1-501, par défaut 501): (just type return)
Utilisation de la valeur par défaut 501

Use the a command to toggle the bootable flag.

Commande (m pour l'aide): a
Numéro de partition (1-4): 1

Use the t command to change partition type to W95 FAT32:

Commande (m pour l’aide): t

Partition sélectionnée 1
Code Hex (taper L pour lister les codes): b
Type de partition système modifié de 1 à b (W95 FAT32)

Finally use the p commande to display current partition table state:

Commande (m pour l'aide): p

Disque /dev/sdc: 4126 Mo, 4126670848 octets
255 heads, 63 sectors/track, 501 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf27e10b5
Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sdc1   *           1         501     4024251   b  W95 FAT32

Quit fdisk with the w commande.

I never needed this step but you can give it a try (syslinux must be installed) :

# dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc

Format the key with the following commande:

mkdosfs /dev/sdc1 -n MANDRIVAONE

Key is ready.

With Windows

Use this tool and set label to MANDRIVAONE (upper case).

Installation

If you didn’t followed the previous steps, set the label to MANDRIVAONE (all upper case).

Download the corresponding kit below and uncompress it at the root of the USB device. This file contains a initrd.usb, syslinux.cfg and /boot/vmlinuz file.

Note : Since version 2009, mandriva one car really be used to install the final system. It removes unused internationalisations and drivers.

Download the mandriva one 2009 iso and copy file /CDROM/loopbacks/distrib-lzma.sqfs to /USB/loopbacks/distrib-lzma.sqfs. (You can mount the iso image without burning a CD with : mount file.iso /mnt -o loop. Use 7-Zip for windows).

Use syslinux to turn the USB device into a bootable linux system :

Windows> syslinux -mf X:
Linux> syslinux -f /dev/sdc1

Where X is the USB letter for windows or the partition device for linux.

If you are satisfied with Mandriva 2009, you can try this tutorial to install Mandriva 2009 LXDE from USB Key.

It seems that syslinux V3.72 doesn’t work. If you face problem booting you may want to try with an older one.

Troubleshoot

If it doesn’t work, please reports:

  • You used linux or windows install ?
  • Your hardware both computer and usb key.
  • Language used on your computer.
  • Description of the boot sequence from turn on computer, hit key XXX to have boot menu, to error message

Most of the time it’s due to bad key preparation or bad typing when labeling the usb key.

What’s next

You may wan’t to try this step by step tutorial on how to install Mandriva 2009 Free with the LXDE (Lightweight X11 Desktop Environnement) from a USB Key for. The guide is full of snapshot to ease the installation process.

If you have a SSD NetBook (EEE-PC 4G for instance), you may wan’t to compress /usr in order to save more than 1GB.

You may wan’t to install mandriva on a USB key.

128 Responses to Mandriva One USB – Eng

  1. Pingback: l’etincelle » Archive du blog » Mandriva 2010 ONE USB avec persistence

  2. Pingback: Mandriva 2010 one USB with persistence | Blog L’Ordikc

  3. Sherwin says:

    Thanks! This is very helpful

  4. Pingback: Mandriva One 2010.2 LiveUSB | Blog L’Ordikc

  5. Андрей,Нарва says:

    Спасибо!
    Отлично работают в многосистемной флешке под syslinux(использован файл initrd.usb ) Проверены 2010.1 и 2010.2.

  6. Omega Adrek says:

    Hi, well i just have a Question how do I open Syslinux or configure on Windows?

  7. lordikc says:

    Hi, just download the program and run it in cmd.exe. The link is provided in the post.

  8. Josip says:

    Worked as intended, just had a problem with vmlinuz file as the way it is written here I understood it has to be in the folder, dumb me. Syslinux was a bit hectic as it doesnt return any message.

    Did it with mandrivaone 2010.2

    Thank You for the guide, all best!

  9. Sander says:

    Hi,

    is it possible to create such kit for Mageia as well? Or do you have some tutorial how to create those kit files?

  10. lordikc says:

    I haven’t tested the brand new mageia yet. I hope that it won’t be necessary for mageia. I guess mandriva didn’t create this kind of boot because of the Mandriva Flash market. Mageia doesn’t have such market so… I’ll test this in a near future.

  11. Marc says:

    Hi,
    I tried to install mandriva 2010.2 final release (mandriva-linux-one-2010.0-GNOME-europe-americas-cdrom-i586.iso) from a Windows XP sp3 onto an USB device (Windows driveletter K:, label MANDRIVAONE). So far downloading and copying and the tool (for formatting USB device?) worked well but now the command “syslinux -mf K:” did NOT? Neither I executed from drive C: ( copied syslinux.cfg to C:) nor executing from K: . Windows always says: unknown command “syslinux” or typo.
    Anyone can help?

  12. lordikc says:

    Try to run it from the install folder or give the full path to the command line :
    C:\syslinuxx\syslinx.exe -mf k:

  13. Marc says:

    syslinx.exe? I only have an syslinux.cfg?!?

    And a second problem I recognized: the Instruction above says: “Download the corresponding kit below and uncompress it at the root of the USB device. This file contains a initrd.usb, syslinux.cfg and /boot/vmlinuz file.” But I don’t have this constallation on my USB device, insteyad it is: BOOT/initrd.usb, syslinux.cfg and [root]/vmlinuz. Do I have to switch that?

  14. lordikc says:

    Yes, you must move the files to the root. Your compression software created this sub-directory.

  15. wuschel says:

    can you do that the same for Mageia?

  16. lordikc says:

    Right now I don’t have much time. But sooner or later yes.

  17. David says:

    And for new Mandriva 2011.0:
    it would be very interesting and useful

    thanks
    bye, David

  18. lordikc says:

    It’s not out yet. Expect it a few days after release.

  19. wuschel says:

    Thank you for your great work with mageia!

  20. ajjp vw says:

    Thanks a lot to lordick for his wonderful method which was great till now for Mandriva on USB.

    From 2011.0 we see that the iso image ships Addons/livecd-iso-to-disk which can be directly used to create “live” and “installable” USB drives directly. But then there seems to be a small bug which with the following modifications work as expected. See
    https://qa.mandriva.com/show_bug.cgi?id=63604
    for the bug and work around as below.

    diff old-livecd-iso-to-disk new-livecd-iso-to-disk
    298c298
    cyl_size=$(( $(/sbin/fdisk -l $device | awk ‘{ if (FNR==4) print $9 }’)/1024 ))
    314c314
    /dev/null 1>/dev/null < /sbin/fdisk $device 2>/dev/null 1>/dev/null << EOF

    Regards,
    Ajjp.vw

  21. David says:

    Mandriva 2011 is out,
    waiting eagerly for your precious Guide

    thanks
    bye, David

  22. lordikc says:

    As ajjp vw pointed out, it’s no longer needed since there is now a native method to do so.
    I haven’t tested it myself yet but it seems that you can add a persistent layer as well.

  23. David says:

    It’s possible dump ISO on Flash sticks in many ways: dd, unetbootin, scripts inside iso,
    but for the persistent partition to create and mainly how to configure and use after the iso img boot from usb stick, how to set them on boot, like we do before, I have not any idea.

    thanks
    bye, Davide

  24. lordikc says:

    You’re right. The mandriva tool format the key as ext2 which make it useless for anything else.
    Finally my kit might still be useful… I’ll work on it.

  25. jice says:

    Please upgrade your kit for mandriva 2011…
    thx in advance

  26. lordikc says:

    On its way but boot sequence changed a lot for this version and I’m short of spare time lately.
    Doing my best…

  27. scanray says:

    hi, good job!!

    I have tried this with MDV2010.2. It work great. I can boot and work with the usb.
    But… I cant make the live usb persistent. I have an old flash mandriva 2008.
    I want this new usb I created work like my old usb. Is Posible ?

    thanks

  28. lordikc says:

    Hi, see the article about persistent mode. http://lordikc.free.fr/wordpress/?p=674