SGD Howto make

From Super Grub Disk Wiki
Jump to navigationJump to search

How to make an SGD disk.

Please check most updated: Put Super Grub2 Disk into a media instead.

How to make a Super Grub2 Disk USB

Official method (not recommended)

Introduction

Official method is not recommend because it wipes your usb device and you will probably don't want to:

  • Loose all your pendrive contents
  • Don't be able to use your pendrive for other tasks

However, it is the method that should always work.

Gnu/Linux

  • Make sure that you start this process without your usb plugged into the computer. Otherwise extract it.
  • Run:
mount
  • Save somewhere the mount output or just make you open a new terminal when running mount again later. As an example output might be:
/dev/sda6 on / type ext3 (rw,errors=remount-ro,commit=0)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,size=5242880,mode=755,size=5242880,mode=755)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=755,size=10%,mode=755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,size=20%,mode=1777,size=20%,mode=1777)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620,gid=5,mode=620)
/dev/sda9 on /home type ext3 (rw,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
  • Insert your usb. In most Gnu/Linux systems it will be automounted. Otherwise mount it manually.
  • Close the Nautilus / Dolphin window that has just appeared.
  • Run again:
mount
  • Take a look at its output. As an example it might be:
/dev/sda6 on / type ext3 (rw,errors=remount-ro,commit=0)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,size=5242880,mode=755,size=5242880,mode=755)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=755,size=10%,mode=755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,size=20%,mode=1777,size=20%,mode=1777)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620,gid=5,mode=620)
/dev/sda9 on /home type ext3 (rw,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdc1 on /media/UNI type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks)
  • Compare the first and the second mount runs. Detect one more line in the second run.
  • Line should be something as:
/dev/sdc1 on /media/UNI type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks)
  • Now let's focus at first part of it: /dev/sdc1
  • Usb Partition device (the mounted one) is /dev/sdc1
  • Usb device is /dev/sdc (Note that the partition number has been lost. That it is right.)
  • Umount the partition device
sudo umount /dev/sdc1 # Ubuntu users
umount /dev/sdc1 # Non sudo distributions
  • Now we are going to dump the Super Grub2 Disk.
  • REMEMBER THAT YOU WILL LOOSE ALL THE PENDRIVE CONTENTS
  • Make sure to adapt the command to your needs:
    • Change /home/user/Desktop for the actual path for you super grub2 disk iso file. You might want to use /tmp
    • Change super_grub2_disk_1.99b1.iso for the iso filename that you have downloaded.
    • /dev/sdc should be your usb device.
sudo dd if=/home/user/Desktop/super_grub2_disk_1.99b1.iso of=/dev/sdc
  • Just to be sure we will finish with:
sudo sync
  • That's it! Usb device is bootable and should contain Super Grub2 Disk.

Gnu/Linux (and being usable for storage later)

  • Format your pendrive as FAT32. However make sure to leave 3 MB unallocated at its beginning.
  • Extract and replug your pendrive
  • Run:
mount
  • Check its output:
/dev/sda6 on / type ext3 (rw,errors=remount-ro,commit=0)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,size=5242880,mode=755,size=5242880,mode=755)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=755,size=10%,mode=755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,size=20%,mode=1777,size=20%,mode=1777)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620,gid=5,mode=620)
/dev/sda9 on /home type ext3 (rw,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdc1 on /media/UNI type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks)
  • Last line should be something as:
/dev/sdc1 on /media/UNI type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks)
  • Now let's focus at first part of it: /dev/sdc1
  • Usb Partition device (the mounted one) is /dev/sdc1
  • Usb device is /dev/sdc (Note that the partition number has been lost. That it is right.)
  • Umount the partition device
sudo umount /dev/sdc1 # Ubuntu users
umount /dev/sdc1 # Non sudo distributions
  • Let's save the partition table
sudo dd if=/dev/sdc of=/tmp/partition_table.bin bs=1 count=66 skip=446
  • Now we are going to dump the Super Grub2 Disk.
  • Make sure to adapt the command to your needs:
    • Change /home/user/Desktop for the actual path for you super grub2 disk iso file. You might want to use /tmp
    • Change super_grub2_disk_1.99b1.iso for the iso filename that you have downloaded.
    • /dev/sdc should be your usb device.
sudo dd if=/home/user/Desktop/super_grub2_disk_1.99b1.iso of=/dev/sdc
  • Save SG2D boot code
sudo dd if=/dev/sdc of=/tmp/sg2d_boot_code.bin bs=446 count=1 
  • Generate newmbr
cat /tmp/sg2d_boot_code.bin /tmp/partition_table.bin > /tmp/newmbr.bin
  • Put the new mbr to the usb device
sudo dd if=/tmp/newmbr.bin of=/dev/sdc
  • Just to be sure we will finish with:
sudo sync
  • That's it! Usb device is bootable and should contain Super Grub2 Disk.
  • And you will be able to use FAT32 partition too!

Windows

  • WARNING. These steps have not been actually tested.
  • Get Windows dd
  • Save it into C:\dd
  • Format your pendrive as FAT32
  • Delete all the partitions from your pendrive (Use Control Panel. Disk Management in Windows Vista or Windows 7)
  • Open command line. Start menu. Run. cmd
  • We will make sure we are at dd folder where its binary it is
cd c:\dd
  • Make sure you know which it is your usb device thanks to:
dd --list
  • Make sure you understand the output:
\\.\Volume{5cd94d2c-3251-11d9-9444-806d6172696f}\
link to \\?\Device\HarddiskVolume1
fixed media Mounted on \\.\c:
\\.\Volume{129b1243-3252-11d9-b167-806d6172696f}\
link to  \\?\Device\CdRom0
CD-ROM Mounted on \\.\r:
\\.\Volume{129b1242-3252-11d9-b167-806d6172696f}\
link to \\?\Device\Floppy0
removable media Mounted on \\.\a:
\\.\Volume{e3429891-0eb9-11da-b18f-000d60dc98cd}\
link to \\?\Device\Harddisk1\DP(1)0-0+3
removable media Mounted on \\.\d:


NT Block Device Objects
\\?\Device\CdRom0
\\?\Device\Floppy0
\\?\Device\Harddisk0\Partition0
link to \\?\Device\Harddisk0\DR0
Fixed hard disk media. Block size = 512
\\?\Device\Harddisk0\Partition1
link to \\?\Device\HarddiskVolume1
\\?\Device\Harddisk1\Partition0
link to \\?\Device\Harddisk1\DR2
Removable media other than floppy. Block size = 512
\\?\Device\Harddisk1\Partition1
link to \\?\Device\Harddisk1\DP(1)0-0+3
Removable media other than floppy. Block size = 512
  • If your usb device is mounted in d: what you care about it is:
\\?\Device\Harddisk1
  • REMEMBER THAT YOU WILL LOOSE ALL THE PENDRIVE CONTENTS
  • Now we are going to dump Super Grub2 Disk image
  • Make sure you adapt the command for your needs:
    • We recommend to rename super grub2 disk image to: sg2d.iso
    • Make sure that:
\\?\Device\Harddisk1

is the correct usb device

dd --progress --size bs=32k if=c:\sg2d.iso of=\\?\Device\Harddisk1
  • That's it! Usb device is bootable and should contain Super Grub2 Disk.

How to make a Super Grub Disk or Super Grub2 Disk Cdrom.

  1. Get Super Grub Disk Cdrom from Super Grub Disk downloads.
  2. After unzipping (or not) you will have a ISO file.
  3. You need to burn this ISO file directly to the disk. See How to Burn Ubuntu ISOs to get an idea.

How to make a Super Grub Disk or Super Grub2 Disk Floppy.

Note for Super Grub2 Disk: Make sure you download the 1.44 MB files. Although not always needed it is recommended it is suggested that you rename the iso extension into img before using it. So that

super_grub_disk_hybrid-1.98s1.iso

becomes:

super_grub_disk_hybrid-1.98s1.img
  1. Put a blank or unused floppy in your floppy drive.

Windows

  1. Use rawritewin program.
  2. With ... button choose the SGD floppy image.
  3. Click on Write button.
  4. Wait till process is 100% complete.

Linux

dd if=/path/to/floppyimage of=/dev/fd0

Unmount the floppy drive to be sure the data is written on the floppy disk.

Note: If you are using an USB floppy drive the output file is /dev/sda or similar rather than /dev/fd0. For a way to find out the right name using the mount command see Super Grub USB Disk.

How to make a Super Grub Disk USB.

Note: With this method you do NOT delete anyone of your pendrive contents. This method needs a Linux working system... if you do not have one you can use a SGD cdrom or floppy or even use a live cd to follow the instructions from there.

I am going to use pendrive as a synonym for USB Flash Drive, USB Hard Disk, USB Hard Drive and so on.

Gnome

  1. Unmount and unplug your pendrive device.
  2. Open a terminal and run:
mount
  1. Insert your pendrive. A window with pendrive contents should open.
mount

Now in the mount output you should see one more line than in the first run of mount:

/dev/sdb1 on /media/all type ext3 (rw,nosuid,nodev,uhelper=hal,data=ordered)

Now we have learned that the USB device is called: /dev/sdb1 (From now on... you should continue the howto with your own USB device which might be /dev/sda1 or something similar).

Get the Super Grub Disk USB tar. Untar it in a temporary folder. Copy and paste the boot folder found in the USB tar so that when opening your pendrive you see: boot (You should not see super_grub_disk_0.9753 or something similar).

  1. Close the pendrive window
  1. Find your pendrive icon in your Desktop.
  2. Right-click on it
  3. Select Umount. Do not select Safe Extraction!!!

Get root permissions on the terminal

sudo -i # in ubuntu
su - # In other systems
sync

Now we will use the /dev/sdb (/dev/sdb is ther hard disk where /dev/sdb1 partition is located) device in grub to associate a virtual grub device (hd3) to it and work with it.

grub
grub>device (hd3) /dev/sdb
grub>root (hd3,0)
grub>setup (hd3)

You should see some messages with perhaps some normal errors.

 grub>quit
 sync

You can now unplug your pendrive.

KDE

  1. Unmount and unplug your pendrive device.
  2. Open a terminal and run:
mount
  1. Insert your pendrive. When asked what to do with new pendrive. Click on Open.

A window with pendrive contents should open.

mount

Now in the mount output you should see one more line than in the first run of mount:

/dev/sdb1 on /media/all type ext3 (rw,nosuid,nodev,uhelper=hal,data=ordered)

Now we have learned that the USB device is called: /dev/sdb1 (From now on... you should continue the howto with your own USB device which might be /dev/sda1 or something similar).

Get the Super Grub Disk USB tar. Untar it in a temporary folder. Copy and paste the boot folder found in the USB tar so that when opening your pendrive you see: boot (You should not see super_grub_disk_0.9753 or something similar).

  1. Close the pendrive window
  1. Find your pendrive icon in Konqueror -> Click on Show Panel if need -> Left Side Bar -> System -> "Saving" Devices
  2. Right-click on it
  3. Select Umount. Do not select Safe Extraction!!!

Get root permissions on the terminal

sudo -i # in ubuntu
su - # In other systems
sync

Now we will use the /dev/sdb1 in grub to associate a virtual grub device (hd3) and work with it.

grub
grub>device (hd3) /dev/sdb
grub>root (hd3,0)
grub>setup (hd3)

You should see some messages with perhaps some normal errors.

 grub>quit
 sync

You can now unplug your pendrive.

Common errors

Some installations in pendrive conflict. Most of them derive from the cylinder BIOS problem.

If you were doing:


grub>root (hd3,0)
grub>setup (hd3)

and after that you got an error 18 or something similar you should:

  • Backup all data on your pendrive (if there is something important ;) )
  • Repartition it so that you have an ext3 or a FAT32 partition at its beginning of only 300 MB.
  • Install SGD into it as it is explained in the instructions

and that's it, SGD should boot without problems.

In the rest of the pendrive you can create a FAT32 or an ext3 partition for putting data.

Windows

Download Unetbootin For Windows

Run Unetbootin. Select Distribution, and from the drop down menu select "Super Grub Disk"

Select the target drive, and hit OK.

Fedora users readme

This message has to be read by Fedora, Redhat or Fedora based distribution users. This section might also apply to Mandriva but I am not sure. (If you are a Mandriva user and you try it please report to the forum).

Whenever we run:

grub>setup (hd3)

you can see something as:

setup (hd3)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd3)"...  26 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd3) (hd3)1+26 p (hd3,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.

Fedora is using grub.conf instead of SGD's menu.lst.

Just after running setup you must identify the install line and modify it so that /boot/grub/grub.conf reads: /boot/grub/menu.lst

In the former example it would be:

grub> install /boot/grub/stage1 (hd3) (hd3)1+26 p (hd3,0)/boot/grub/stage2 /boot/grub/menu.lst

Then you just continue with the next howto step.

You might also be interested in