You are not logged in.

#1 2012-09-06 19:02:47

odp
Member
Registered: 2012-04-26
Posts: 136

[SOLVED]How do I install the new arch onto an usb stick?

Hi.

I followed the beginners guide but no matter what I do I am dropped to a rescue shell after reboot.

It mentions that if I want to install to an usb stick I need to follow 'Installing_Arch_Linux_on_a_USB_key' but that guide is out of date!

So what additional steps do I have to make to the beginners guide to get a working install?

thanks

Last edited by odp (2012-09-24 23:34:18)

Offline

#2 2012-09-06 19:29:46

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

You should probably read that page only for general information. There is no longer an installer and GRUB Legacy is no longer supported. If it were me, I would use this method to boot the ISO from RAM (to be able to install Arch on the same stick), and follow the Beginners' Guide until "Create an initial ramdisk environment":

Here you need to set the right hooks if the root is on a USB drive, if you use RAID, LVM, or if /usr is on a separate partition.

Set the "usb" hook in there, re-generate the initramfs, then keep following the guide.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-09-06 19:57:09

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

so when I get to mkinitcpio -p linux I add -usb or?

Offline

#4 2012-09-06 20:04:53

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

Here you need to set the right hooks if the root is on a USB drive, if you use RAID, LVM, or if /usr is on a separate partition.

Edit /etc/mkinitcpio.conf as needed and re-generate the initramfs image with:

# mkinitcpio -p linux

You would edit it like the other configuration files, using nano.

Follow the guide and pay attention.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-09-06 23:21:12

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

Yes, so I've done as the guide explains still I end in the recovery shell. "Unable to find root device"

Offline

#6 2012-09-06 23:45:04

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [SOLVED]How do I install the new arch onto an usb stick?

odp wrote:

Yes, so I've done as the guide explains still I end in the recovery shell. "Unable to find root device"

You should identify the root device with its UUID: root=UUID=... or root=/dev/disk/by-uuid/... since the order of USB devices can be very unstable and different on each computer.
Did you add usb to the hooks in /etc/mkinitcpio.conf?

Offline

#7 2012-09-07 05:08:29

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

GRUB identifies by UUID. If you installed Syslinux, see the basic config on how to use UUIDs.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#8 2012-09-07 13:27:25

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

progandy wrote:

You should identify the root device with its UUID: root=UUID=... or root=/dev/disk/by-uuid/... since the order of USB devices can be very unstable and different on each computer.
Did you add usb to the hooks in /etc/mkinitcpio.conf?

I added usb to the hooks in mkinitcpio.conf

You mean I define the root partition by uuid in syslinux as mentioned below?

I should just forget about grub?

Offline

#9 2012-09-07 13:32:35

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

DSpider wrote:

GRUB identifies by UUID. If you installed Syslinux, see the basic config on how to use UUIDs.

So I will add usb to the hook in mkinitcpio.conf then build the ramdisk, right?

Then install syslinux instead of grub, configure syslinux.cfg with  root=/dev/disk/by-uuid/'disk id' ro ?!

Last edited by odp (2012-09-07 14:16:46)

Offline

#10 2012-09-07 14:18:26

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

I am still being dropped to a recovery shell. When doing a ls -l /dev/disk/by-uuid The only disk I can see is the internal hdd.

Offline

#11 2012-09-07 15:01:45

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,381

Re: [SOLVED]How do I install the new arch onto an usb stick?

odp wrote:

Yes, so I've done as the guide explains still I end in the recovery shell. "Unable to find root device"

It's definitely missing the usb hook into mkinitcpio.conf. ALSO make sure to change (hd0,x) in menu.lst for grub legacy (x the partition choosen to boot arch). Remember to modify the /etc/fstab to point to your partition root. If you go for grub2 it's adviceable to read the the wiki and don't miss to install os-prober to ensure smoothly find the bootable partitions, automatically.

My installation preference lead me to do this way


do it good first, it will be faster than do it twice the saint wink

Offline

#12 2012-09-07 22:36:49

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

TheSaint wrote:
odp wrote:

Yes, so I've done as the guide explains still I end in the recovery shell. "Unable to find root device"

It's definitely missing the usb hook into mkinitcpio.conf. ALSO make sure to change (hd0,x) in menu.lst for grub legacy (x the partition choosen to boot arch). Remember to modify the /etc/fstab to point to your partition root. If you go for grub2 it's adviceable to read the the wiki and don't miss to install os-prober to ensure smoothly find the bootable partitions, automatically.

My installation preference lead me to do this way

I added usb to the hook in mkinitcpio.conf then build the ramdisk

Then I installed syslinux instead of grub, configure syslinux.cfg with  root=/dev/disk/by-uuid/'disk id' ro ?!

Last edited by odp (2012-09-07 22:44:14)

Offline

#13 2012-09-08 06:04:55

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

Which part of basic config wasn't clear?


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#14 2012-09-08 11:20:31

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

I did see the issue with my syslinux.cfg, I was supposed to write APPEND root=UUID='uuid' ro

For a moment it seemed to work out. I rebooted the system, and was presented with the syslinux boot menu. Selected to boot into Arch, and was prompted with the message 'searching for root w/ UUID xxx'
Then the services started to initialize as normal but, when it was finished I was dropped to a blank screen. what could this mean?

Offline

#15 2012-09-08 11:45:53

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

Something about 10 seconds couldn't find root "blablabla" means that you didn't re-generate the initramfs. You may have re-generated the one from the LiveCD, which is useless because it was saved in RAM and that goes away after rebooting.

Try the Fallback entry first: https://wiki.archlinux.org/index.php/Pa … onger_boot

Then, if it doesn't work, from a "live" Linux distribution (or an installed one), chroot into your USB stick install, edit the mkinitcpio.conf file to make sure that the "usb" hook is set correctly (on the HOOKS line, not MODULES), then re-generate the initramfs:

# mount /dev/sdxY /mnt         #The USB stick (aka your root partition).
# mount /dev/sdxZ /mnt/boot    #If you have a separate boot partition.
# arch-chroot /mnt
# nano /etc/mkinitcpio.conf
<make sure that usb is on the HOOKS line>
# mkinitcpio -p linux

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#16 2012-09-08 13:37:20

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

I did what was mentioned in the link above (as DSpider stated) with the same result, I was dropped to a blank screen after the services was initialized.
To make a check, I booted into the live cd again, and mounted the root fs to /mnt by its uuid it seemed like it should. But with the same result. I also checked the fstab if everything was ok and it was.


UPDATE: I accedently booted from my new usb-stick while the live-cd was in the drive. I was then able to boot into the new install. So what can I have done wrong, and how to proceed from here?

Last edited by odp (2012-09-08 13:50:55)

Offline

#17 2012-09-08 14:04:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,381

Re: [SOLVED]How do I install the new arch onto an usb stick?

I'm preferring to name the partitions rather than using UUIDs. It's simplier to remember and to implement the correct address for the bootloader.
When Grub boots it's also easy to modify the boot on-the-fly. Then  partition names would help more.

Last edited by TheSaint (2012-09-08 14:05:36)


do it good first, it will be faster than do it twice the saint wink

Offline

#18 2012-09-08 14:18:33

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

"Partition names" is too vague. You mean labels?

Because the names (as in, the names assigned by the kernel), are sda1, sda2, sda3, etc. These are subject to change if you have multiple USB sticks.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#19 2012-09-08 14:22:36

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

TheSaint wrote:

I'm preferring to name the partitions rather than using UUIDs. It's simplier to remember and to implement the correct address for the bootloader.
When Grub boots it's also easy to modify the boot on-the-fly. Then  partition names would help more.

Also I'm using syslinux instead of grub

Offline

#20 2012-09-09 00:54:10

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

Tomorrow I will make another attempt but write down every step I make. Maybe you could go thrugh them and check if everything is in order?
Eventually it could become an updated entry for the WIKI

Offline

#21 2012-09-09 14:47:17

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,381

Re: [SOLVED]How do I install the new arch onto an usb stick?

DSpider wrote:

"Partition names" is too vague. You mean labels?

Oh, yes!
Yesterday I was a bit short on english definitions smile
Basically it's like the letters on the phone keyboard. Many peoples attempt to associate a name corresponding their numbers rather than remember them.
Also the UUID are difficult to manage tongue

Better to post fdisk -l and cat /etc/fstab of the pretended to boot Arch.

Last edited by TheSaint (2012-09-09 14:58:51)


do it good first, it will be faster than do it twice the saint wink

Offline

#22 2012-09-09 15:02:20

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

Nah, they're not difficult to manage at all. Set them once in fstab and forget about it.

I'm also going to install Arch Linux x64_86 on a USB stick soon. But I'm not worried. I've done it plenty of times in VirtualBox and it's really not that difficult. Apart from setting the usb hook in mkinitcpio.conf when you get to the "Create an initial ramdisk environment", I don't thing there's anything else special that you need to do. I bet you can even use /dev/sda1 (unless the stick was partitioned differently, of course) for the root partition in fstab and syslinux.conf (for Syslinux, because GRUB uses UUIDs). This is because of the BIOS boot order. "Live" Linux distributions show the USB stick as /dev/sda1 on my machine. For other BIOS motherboards it may be different, I don't know.

Last edited by DSpider (2012-09-09 19:42:53)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#23 2012-09-10 00:01:32

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

Can we agree that I should make the fstab with -U to use UUID's?

genfstab -p -U /mnt > /mnt/etc/fstab

My hook in mkinitcpio.conf should look like this

HOOKS="base udev autodetect usb pata scsi sata filesystems"

I should generate it with

mkinitcpio -p linux

Last, my syslinux.cfg should look in order of
LABEL arch
        LINUX ../vmlinuz-linux
        APPEND root=UUID='UUID' ro
        INITRD ../initramfs-linux.img

LABEL archfallback
        LINUX ../vmlinuz-linux
        APPEND root=UUID='UUID' ro
        INITRD ../initramfs-linux-fallback.img

Where 'UUID' is the UUID of my root disk equal to sdc3 if my disk partitioning scheme looks like this: sdc > sdc1=boot sdc2=swap sdc3=root sdc4=home

Last edited by odp (2012-09-10 00:20:17)

Offline

#24 2012-09-10 06:49:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED]How do I install the new arch onto an usb stick?

Yeah. Looks good.

Except that swap on flash media isn't really recommended... With 2 GB and up, you don't even needed swap. But if you plan on whoring it around on other computers, some of them could have lower memory. Even if the USB stick dies, you can always replace it.16 GB is cheap now.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#25 2012-09-10 07:49:35

odp
Member
Registered: 2012-04-26
Posts: 136

Re: [SOLVED]How do I install the new arch onto an usb stick?

Ok ok so I can drop the swap on the stick. Anyway, the config I wrote above produce the same scenario mentioned in comment #16. So feel free to try it yourself and lets compare some results. I'm quite confused about mine.

Offline

Board footer

Powered by FluxBB