Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Hardware & Laptops
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Hardware & Laptops
Problems with hardware & laptops not being detected or supported during or after install.

 
 
Thread Tools Display Modes
Old June 26th, 2006   #141
kabanta
A Carafe of Ubuntu
 
Join Date: Jan 2005
Beans: 86
Re: Ubuntu on a USB drive?

Quote:
Originally Posted by K0LO
In principle, it would seem that you could also do this by formatting the main partition as ext2 and then installing GRUB, configured to start up any of the choices (live, persistent, memtest, etc). You could then delete all of the syslinux related files.

I don't see why this wouldn't work. Anybody care to give it a go?
I would certain be willing to experiment on my drives. However, there are a couple of things I don't know/understand and would need some help:
  1. I don't really understand the relationship between Syslinux and Grub. Some descriptions I have seen suggest that these are simply alternative bootloaders. But I have also seen descriptions that imply that Syslinux can/does rely on Grub.
  2. How to install Grub. The process you all described for creating syslinux-based LiveUSB involves copying some files, making a couple of edits, and running syslinux. Presumably, installing Grub instead would still involve the first two parts of this process, but how to do the "grub part"?

I'm looking around for some tutorials etc., but if anyone here can already suggest a way to modify the existing LiveUSB install-process to include Grub rather than Syslinux, let me know.
kabanta is offline  
Old June 26th, 2006   #142
K0LO
A Carafe of Ubuntu
 
Join Date: Jan 2006
Location: Pennsylvania, USA
Beans: 125
Kubuntu 7.04 Feisty Fawn
Send a message via AIM to K0LO
Re: Ubuntu on a USB drive?

kabanta:

I'd try also if I had the time, but right now I can't.

Syslinux does not rely on GRUB. When you boot your pen drive using syslinux, there is no copy of GRUB on the drive. As far as I know they are independent bootloaders.

I think the process of making a USB pen drive to use GRUB instead of syslinux would go as follows:

1. In my post #100, don't do steps 6 and 7 (don't copy the syslinux files and no need to duplicate the kernel, initrd, and memtest files at the root level; leave them where they are).

2. Size the main partition accordingly so that the caper-rw partition can be as large as possible.

3. Install GRUB to the MBR of the pen drive. You can find instructions for doing this in the GRUB manual, section 3.2. The manual is at http://www.gnu.org/software/grub/manual/grub.html

4. Try booting the system by manually entering GRUB commands as described in the GRUB manual, section 4. If this works, then you can go on to the next step.

5. Create the menu.lst file for GRUB (see manual section 5). Copy the general syntax by looking at your /boot/grub/menu.lst file on your current Linux box. Under the menu choices you could set up GRUB to boot the same variants as syslinux was doing -- Live, Persistent, memtest, etc. just by adding the appropriate lines to the menu.lst file. The syntax would be kind of similar to the lines in the syslinux.cfg file, but you'd have to check the GRUB manual to be sure of the exact required syntax. Setting up the ramdisk is the one area that I'm the least sure of how to do. This would require further research.

Mark
K0LO is offline  
Old June 27th, 2006   #143
kabanta
A Carafe of Ubuntu
 
Join Date: Jan 2005
Beans: 86
Re: Ubuntu on a USB drive?

Quote:
Originally Posted by K0LO
I think the process of making a USB pen drive to use GRUB instead of syslinux would go as follows ... Setting up the ramdisk is the one area that I'm the least sure of how to do. This would require further research.
Ok, thanks for the tips. I'll experiment with this over the next couple of days.
kabanta is offline  
Old June 27th, 2006   #144
sunset_studies
Just Give Me the Beans!
 
Join Date: Dec 2004
Location: earth
Beans: 61
Ubuntu 8.10 Intrepid Ibex
Re: Ubuntu on a USB drive?

Hi, thanks to all of this information, I finally got Dapper running on my USB key. One thing bothers me though: the 'dapper' disk (as opposed to the 'casper' one) seems to be writable. Should it not be loaded read only so as to save writes to the flash memory?
sunset_studies is offline  
Old June 27th, 2006   #145
K0LO
A Carafe of Ubuntu
 
Join Date: Jan 2006
Location: Pennsylvania, USA
Beans: 125
Kubuntu 7.04 Feisty Fawn
Send a message via AIM to K0LO
Re: Ubuntu on a USB drive?

That sounds reasonable. Remember though that the system runs from ramdisk, and the ramdisk must be mounted as read/write.
K0LO is offline  
Old June 28th, 2006   #146
kabanta
A Carafe of Ubuntu
 
Join Date: Jan 2005
Beans: 86
Re: Ubuntu on a USB drive?

Quote:
Originally Posted by K0LO
I think the process of making a USB pen drive to use GRUB instead of syslinux would go as follows
Unfortunately, at the moment I am in the process of moving and only
have access to a 4gb flash-drive -- and it requires some tricks to get
my computer to recognize it as bootable with such a large drive. So, I
have not succeeded yet to get this working -- and I'm not sure how
soon I can get back to this. However, here are some instructions that
may help someone else to finish in the meantime.

Based on your (Kolo) steps:
  1. Follow the steps for the HolyCow install

    BUT:
    • Partition USB-drive with both partitions as ext2
    • Don't do step 6 or 7 (This is based on what you wrote, Kolo.)

  2. Create a /boot directory in primary partition (not the "casper-rw" partition)

  3. Install GRUB as follows:

    1. Make sure your USB drive is mounted

    2. Type "sudo grub" which makes a GRUB prompt appear.

    3. Type "find /boot/grub/stage1". You'll get a response like this:

      Code:
         (hd0,3)
         (hd1,0)
      This means:

      (hd0,3) a grub bootloader for the computer's built-in disk (hd0) is on partition 4 (probably /dev/hda4)

      (hd1,0) a grub bootloader for mounted usb disk (hd1) is on partition 1 (probably /dev/sda1)

      (Note that you could get many more items if you have several boot-up partitions and/or additional usb drives mounted when you do this. To keep things reasonably simple and clear, you should probably not have any other USB devices attached to your computer when you do this entire procedure.)

      So, for the listing above, we would want to do the next steps on (hd1,0) -- but when you do this, make sure to select YOUR equivalent of the USB drive's primary partition

    4. Type "root (hd1,0)" (without quotes)

    5. Do "setup" with one of two options:

      - To have Grub for the entire disk, type "setup (hd1)"

      - To have Grub for the partition, type "setup (hd1,0)"

      (For a small thumb-drive with only the two partitions described in this procedure, it shouldn't make a difference which one you choose.)

    6. Type "quit".

  4. Check to see that you have a /boot/grub/ directory on the usb-drive -- the contents should be similar to the contents of your computer's /boot/grub directory.

  5. Create the /boot/grub/menu.lst file (or, if it already exists, open it).

    AS A SIMPLE WAY TO TEST YOUR SYSTEM, paste the following into menu.lst file:
    Code:
    # default startup item
    default		0
    
    ## timeout in seconds
    timeout		10
    
    # Pretty colours
    color cyan/blue white/blue
    
    ## default grub root device
    # groot=(hd0,0)
    
    title		Ubuntu 6.06 LiveUSB
    root		(hd0,0)
    kernel		/casper/vmlinuz root=/dev/sda1 ro quiet splash
    initrd		/casper/initrd.gz
    savedefault
    boot
    (Note: I believe the information above will work, but again, haven't been able to test it.)

  6. Save the menu.lst file and reboot off the usb-drive.

  7. If this works, someone else may be able to provide follow up for more complex Grub menu at startup -- and persistent memory.
HTH, k.

Last edited by kabanta; June 28th, 2006 at 10:54 AM..
kabanta is offline  
Old June 28th, 2006   #147
Cruzer
First Cup of Ubuntu
 
Join Date: Jun 2006
My beans are hidden!
Re: Ubuntu on a USB drive?

Hi people!
I was just wondering, since you people know about tech stuff, which is the fastest flash drive out there?
I succesfully got LiveUbuntu on an old usb drive and it's cool but kinda slow , so i'm thinking on getting one thats really fast that way boot time will be less.
Thanks
Cruzer is offline  
Old June 28th, 2006   #148
K0LO
A Carafe of Ubuntu
 
Join Date: Jan 2006
Location: Pennsylvania, USA
Beans: 125
Kubuntu 7.04 Feisty Fawn
Send a message via AIM to K0LO
Re: Ubuntu on a USB drive?

http://www.tomshardware.com/2005/08/...ves/index.html

The article is a little old, so perhaps there's something faster now.

Here's a more recent article:
http://chris.pirillo.com/2006/06/02/...t-flash-drive/
K0LO is offline  
Old June 29th, 2006   #149
sunset_studies
Just Give Me the Beans!
 
Join Date: Dec 2004
Location: earth
Beans: 61
Ubuntu 8.10 Intrepid Ibex
Re: Ubuntu on a USB drive?

Quote:
Originally Posted by K0LO
That sounds reasonable. Remember though that the system runs from ramdisk, and the ramdisk must be mounted as read/write.
Hi,

I won't pretend to know exactly what that means, but 'fair enough'. Next on the agenda: how to encrypt the Casper partition and therefore protect against loss/theft... any clues?
sunset_studies is offline  
Old June 29th, 2006   #150
andrewsawyer
Quad Shot of Ubuntu
 
andrewsawyer's Avatar
 
Join Date: May 2005
Location: Cairns, Australia
Beans: 358
Edgy Eft Testing
Send a message via AIM to andrewsawyer Send a message via MSN to andrewsawyer Send a message via Yahoo to andrewsawyer Send a message via Skype™ to andrewsawyer
Re: Ubuntu on a USB drive?

Quote:
Originally Posted by sunset_studies
Hi,

I won't pretend to know exactly what that means, but 'fair enough'. Next on the agenda: how to encrypt the Casper partition and therefore protect against loss/theft... any clues?
For an encrypted Ubuntu (the actual distro, you would need a third partition. One partition for GRUB etc, one for the main filesystem files - squashfs etc, and then a third as a casper-rw.

I would suggest that you would do it in a similar fashion to http://ubuntuforums.org/showthread.php?t=120091 only making some changes. It would also require (to my knowledge) that we can get the LiveUSB working with GRUB as the bootloader.

To encrypt the casper-rw would be more difficult as I would think that you would have to play around inside the squashfs file (I may be mistaken). You may be able to link the encryption into the GRUB section to it would un encrypt both partitions off the one command however I'm only guessing whether this is possible.

Just my 2c.

Last edited by andrewsawyer; June 29th, 2006 at 04:29 AM..
andrewsawyer is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:37 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry