Friday, May 04, 2007

Install BeleniX (OpenSolaris Live CD) into a USB thumb drive

BeleniX Live CD works just fine. But when you try to install it into a USB thumb drive following the installation instruction, you may get frustrated. The installer doesn't work! At least it doesn't work for me. I had to debug the installer script step by step to see where the problems result from. Finally, I worked out and successfully installed it into a USB drive. There are two places in the script to which you need to pay attention.
  • the command at line 211
# rmformat -s /tmp/slices /dev/rdsk/c0t0d0p0
This command simply doesn't work in my case. Maybe the slices information in /tmp/slices generated by the script are not correct, maybe not. Since there was no error returned, I have no idea why it failed. After running this command, 2 slices are supposed to be created and labeled. However, if you run the following command

# newfs /dev/rdsk/c0t0d0s0 < /dev/null
You will get error "no such device" sth. like that. In this case, you can run the command below instead to create the slices and label them based on /tmp/slices

# format -e
It's interactive. You just follow the instructions to do so.

  • The command at line 281
# installgrub -mf stage1 stage2 $devs > /dev/null
You will get error "can not read stage1 file stage1" if you follow the provided installer. The reason is there is no such a file called stage1 in /boot/grub directory. Where you can get the required stage1? Don't run

# umount /mnt/belenix
at line 274. You need to run the commands below first:

# cd /mnt/belenix/boot/grub
# installgrub -mf stage1 stage2 /dev/rdsk/c0t0d0s0 > /dev/null
# umount /mnt/belenix
# lofiadm -d $BELENIX_ISO_PATH
All the required files to run installgrub are in /mnt/belenix/boot/grub.

A successful installation! You can enjoy the LiveUSB boot from now on!

3 comments:

Anil said...

Hi,

I wrote the LiveUSB scripts (usbdump) and would like to know on what OS were you trying to install belenix from? BeleniX or Solaris Express?

There are some known issues with the script and they will be cleared in version 0.6. Meanwhile get back to me at anil dot verve at gmail and I'll help you get a BeleniX LiveUSB running :)

秦人木夫(Ocean) said...

Hi Anil, I were using BeleniX to make the LiveUSB. Firstly, I downloaded the BeleniX Live CD ISO image on Windows platform. Then I burned the Live CD. After booting from the Live CD, I mounted the NTFS file system in which I put the ISO image and made the LiveUSB. Nice to hear 0.6 is coming on the way! When will it be released?

Anonymous said...

Interesting to know.