You are not logged in.

#1 2014-01-27 04:12:24

kevin24
Member
Registered: 2013-07-20
Posts: 9

Install on usb flash GRUB

Hi,

From wiki page "Installing Arch Linux on a USB key" under Grub Legacy section it states I should edit menu.lst to change items to reflect what I am using - label, UUID etc. and to ensure the key is (hd0, 0).

I am using the latest iso - 2014.01.05 with grub as downloaded using packman -S grub.

I cannot find this file. Should I be using /etc/default/grub.

If that is the case I cannot find any references to the items as stated :-

Example:
root (hd0,0)
kernel /boot/vmlinuz-linux root=/dev/sda1 ro
initrd /boot/initramfs-linux.img

Could someone show me the way. Many thanks.

Offline

#2 2014-01-27 04:37:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Install on usb flash GRUB

You are using Grub, not grub-legacy (they are different packages).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-01-27 04:38:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Install on usb flash GRUB

It is referred to as "legacy" for a reason.  On that "Grub Legacy" wiki page, in the first "warning" box, you will see why this is the case.  You can also find links to the up to date grub wiki page there.

Offline

#4 2014-01-27 04:52:33

kevin24
Member
Registered: 2013-07-20
Posts: 9

Re: Install on usb flash GRUB

Hi,

Yes I knew Legacy has been updated. I cannot find any reference under Grub to ensuring the (hdd0,0) is present.

I note it says the current defaults to using the UUID option.

I see it has an example config with:-

# (0) Arch Linux
menuentry "Arch Linux" {
  set root=(hd0,1)
  linux /vmlinuz-linux root=/dev/sda3 ro
  initrd /initramfs-linux.img
}

I do not have this in my /etc/default/grub file.

Do I include it ?? Since I understand I have to have the (hd0, 0) line in for a usb flash install to run.

Thanks.

Offline

#5 2014-01-27 04:56:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Install on usb flash GRUB

I don't use grub, but I would think that if you are trying to boot from a USB, then you would want to use UUIDs or labels to ensure that the device is correctly identified when it is plugged in. hdx would not be reliable at all.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2014-01-27 10:00:31

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: Install on usb flash GRUB

Hi, I use archlinux on a usb key, I recommend that you install  Syslinux

# pacstrap -i /mnt base base-devel syslinux
# genfstab -U -p /mnt >> /mnt/etc/fstab

# cat /etc/fstab

# /dev/sda1
UUID=23bc0a3b-eb44-44e1-bb05-f15dda6d7d13       /               ext4            defaults,noatime        0 1

sh# arch-chroot /mnt
sh#mkinitcpio -p linux
sh#syslinux-install_update -i -a -m

sh# cat /boot/syslinux/syslinux.cfg

LABEL arch
         LINUX ../vmlinuz-linux
         APPEND root=UUID=23bc0a3b-eb44-44e1-bb05-f15dda6d7d13 rw
         INITRD ../initramfs-linux.img

Last edited by ivoarch (2014-01-27 10:02:03)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#7 2014-01-27 11:28:00

kevin24
Member
Registered: 2013-07-20
Posts: 9

Re: Install on usb flash GRUB

Hi ivoarch,

Thanks for that tip. Is there a reason you use syslinux as opposed to grub. I did notice that syslinux does not support multi- fs.

Although I have set up a fully working system on a Mac, this is my first attempt on an USB.

I know off topic but if you have time could you email me with your partition layout and file system and any other pointers you think May be useful. Many thanks.

Offline

#8 2014-01-27 12:13:11

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: Install on usb flash GRUB

I chose syslinux, because is more simle to configure and install. (It meets my needs)

I've been using arch in usb recently, at the moment I don't have any problem.  I followed the steps and recommendations of the "Installing Arch Linux on a USB key" from the wiki.

I have 16gb USB with only 2 partitions with (ext4) - / ROOT 6GB with BOOT flag and /home.

Tips
I use for my browser https://aur.archlinux.org/packages/profile-sync-daemon/
I added https://wiki.archlinux.org/index.php/SS … d.2FWrites
I don't use swap.
I have installed kernel-netbook for my netbook Acer Aspire One
I use Emacs as my operation system smile.

My archlinux on usb https://github.com/ivoarch/ivoarch.gith … on_usb.org
My installed packages https://github.com/ivoarch/.dotfiles/bl … ckages.org

Last edited by ivoarch (2014-01-27 12:25:04)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#9 2014-01-27 16:32:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Install on usb flash GRUB

jasonwryan wrote:

I don't use grub, but I would think that if you are trying to boot from a USB, then you would want to use UUIDs or labels to ensure that the device is correctly identified when it is plugged in. hdx would not be reliable at all.

Though you can use UUIDs for the kernel command line in the grub.cfg, I think that for itself it still uses its own internal HDD/partition numbering system.  That is, it uses the hd(x,y) notation, where the first HDD (x) starts at 0 and the first partition (y) starts at 1.  Then I think you can potentially start running into the same issue you have with using the /dev/sdXY notation on the kernel command line.  In particular, it would seem as though sticking grub on an external disk would only exacerbate this issue.

But I agree, the OP should just use syslinux.  I rather doubt that it would even be practical to put multiple distributions on a single USB flash drive.

Offline

#10 2014-01-27 21:55:20

kevin24
Member
Registered: 2013-07-20
Posts: 9

Re: Install on usb flash GRUB

Hi,

Fully appreciate all your suggestions and thoughts. Many thanks.

Offline

Board footer

Powered by FluxBB