You are not logged in.

#1 2012-03-31 18:27:38

yasar11732
Member
Registered: 2010-11-29
Posts: 127

[SOLVED]how to set up menu.lst on usb stick

Hi,

I have installed arch linux on a usb stick from my current system, using pacman by setting different root. I have successfully installed grub on it, and I have also seen the grub menu on it on boot. I am sure I have seen usb's grub menu, because grub on my hard drive have different entries. However, when I choose it, it loaded up my current system, instead of the one in the usb. I am guessing it's because I am confused with drive names.

Here is menu.lst file from my usb;

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz-linux root=/dev/sda1 ro
initrd /boot/initramfs-linux.img

I have set root to be sda1, because I thought usb key would be sda when I boot from it. Here is my /boot/grub/device.map file

(fd0)     /dev/fd0
(hd0)    /dev/sda
(hd1)    /dev/sdb

And, this is mount from chroot environment.

/dev/sdb1 on / type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
/dev on /dev type devtmpfs (rw,nosuid,relatime,size=638084k,nr_inodes=159521,mode=755)

Should I change sda to sdb, and hd0 to hd1? I want to use this usb on a different machine too, so it should be independent of my current system. Thanks in advance.

Update:
This settings booted up a kernel, but that kernel couldn't mount root partition. I am not sure which kernel  it was.

title  Arch Linux
root   (hd1,0)
kernel /boot/vmlinuz-linux root=/dev/sdb1 ro
initrd /boot/initramfs-linux.img

SOLVED
I have used this setting:

title  Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/0637815e-9864-4a45-a361-d6c36b3cd3d1 ro
initrd /boot/initramfs-linux.img

And also, needed to add "usb" to mkinitcpio.conf in my flash drive. And it worked.

Last edited by yasar11732 (2012-03-31 19:52:14)


Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.

Offline

Board footer

Powered by FluxBB