You are not logged in.

#1 2025-06-04 16:24:40

xerxes_
Member
Registered: 2018-04-29
Posts: 912

[SOLVED] How to boot usb pendrive from grub for system rescue

This is related with update, because I want to learn how to boot archiso usb pendrive from grub in case I couldn't boot system after full system update.
And it is not simple to boot from alternative boot source on this system because it can not boot from usb from bios, archiso image is too big to fit on cd, can fit on dvd, but dvd is too slow (and last time it failed to boot with some error - I don't remember what was it, maybe dvd was wrong recorded, but it was loading really long).

So I wanted to boot usb archiso from grub. I verified it on other system and booted from it and verified that this usb archiso is recorded well.
Next I tried to boot it from this system from grub. That was my command sequence in grub after pressing 'c' :

grub> set pager=1
grub> ls
grub> ls (hd1,msdos2)
grub> set root=(hd1,msdos2)
grub> linux /arch/boot/x86_64/vmlinuz-linux
grub> initrd /arch/boot/x86_64/initramfs-linux.img
grub> boot

Then I saw something like this:

:: running early hook [udev]
Starting systemd-udevd version 257.5-2-arch
:: running early hook [archiso_pxe_nbd]
:: running hook [udev]
:: Trigering uevents...
[     6.021829] nouveau 0000:04:00.0: bus: MMIO read of 00000000 FAULT at 3e6684
[ PRIVRING ]
:: running hook [memdisk]
:: running hook [archiso]
:: running hook [archiso_loop_mnt]
:: running hook [archiso_pxe_common]
:: running hook [archiso_pxe_nbd]
:: running hook [archiso_pxe_http]
:: running hook [archiso_pxe_nfs]
:: Mounting '' to '/run/archiso/bootmnt'
ERROR: '' device did not show up after 30 seconds...
       Falling back to interactive prompt
       You can try to fix the problem manually, log out when you are finished
sh: can't access tty: job control turned off
[rootfs ~]# _

And I landed in something like grub/grub rescue where not much command are available: there is no arch-chroot, but there is lsblk and kernel loaded is 6.14.4-arch1-2 from 29 Apr 2025.

So what this error mean? Where I did mistake?

Last edited by xerxes_ (Yesterday 11:04:18)

Offline

#2 2025-06-04 18:13:34

cryptearth
Member
Registered: 2024-02-03
Posts: 1,452

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

xerxes_ wrote:

And it is not simple to boot from alternative boot source on this system because it can not boot from usb from bios

as booting from usb is a feature that became common some time between XP and Win7 - so about mid-2000s - and is part of the uefi spec which became mainstream around the win7 release - about 2009/2010 - how damn old is that hardware?
EVERY system I had my hands on since Win7 released in 2009 was able to boot from usb - I highly doubt that your hardware really suffer from this issue unless it really is 20 years old - and in that case I would recommend against even trying to use it with modern day linux but would advice something more era-correct like opensuse 10.x or debian 6 - or win7

also the netboot image is just 135mb and fits even on those small cd with 300mb capacity - no need for the full blown 1.2gb image - but given the rest I doubt the system even has the required amount of ram

also also you missing tge required archiso soecific parameters - look at the grub.cfg what you miss

tldr: this all doesn't make much sense without a lot more information about the hardware

Last edited by cryptearth (2025-06-04 18:17:06)

Offline

#3 2025-06-04 20:34:48

xerxes_
Member
Registered: 2018-04-29
Posts: 912

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

Yes, this is very old system, but it still works well: it has 4GB RAM and SSD drive, so it is booting and behave quite fast. BIOS on motherboard say that is from 2007. It have F8 boot menu select, I see in POST boot messages that it see that I plug in pendrive to usb port, but it just can't boot from it and in BIOS there is no option to boot from usb.

I just tried to start archiso from grub on the other system (which is a bit newer laptop which can boot from usb) which the same command sequence like in previous post, but it failed with the same error.

I look in grub config on archiso and will try to boot arch iso from grub with linux options from there.

I will try to achieve that goal no matter what, because ability to boot other sources from grub (or other boot loaders) is interesting and may be useful.

Offline

#4 2025-06-04 21:02:11

cryptearth
Member
Registered: 2024-02-03
Posts: 1,452

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

jeez - why is it that people are just incapable of just give a brief list of the hardware:
- board brand and model
- cpu model
- amound and type of ram
- additional plugin cards like gpu or others
is it really THAT hard? the storage doesn't matter as it's all sata anyway - so even if a ssd is used it's limited by the hba anyway - which back then often was connected via the chipset and most ssds weren't any faster than good hdds anyway - the actual speed increase comes from the seekless random access ability
hardware from 2007 definitely is capable of booting from usb - the issue here is rather likely how you prepared the drive and that it's not in a way the bios expects it - likely due to the fact whatever you used to prepare the stick just doesn't support such old setups anymore and hence just doesn't care to prepare the drive the way required

xerxes_ wrote:

I will try to achieve that goal no matter what, because ability to boot other sources from grub (or other boot loaders) is interesting and may be useful.

then do it properly by correctly prepping the pendrive in a way the bios requires it to be able to boot it - which we could help you with if you would provide your actual hardware

the other way better solution - also in regards to overall efficiency: just dump that 20 year old pile of ancient tech trash and get something more post-covid like - and don't tell me about money - look at LTTs scrapyard series - you can get away with modern systems for less than 100 bucks in most parts of the world

Offline

#5 2025-06-04 22:09:13

xerxes_
Member
Registered: 2018-04-29
Posts: 912

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

OK, my system is:

fastfetch:
OS: Arch Linux x86_64
Host: P5L-MX (Rev 1.xx)
Kernel: Linux 6.12.31-1-lts
Uptime: 1 hour, 42 mins
Packages: 3083 (pacman)
Shell: bash 5.2.37
Display (DVI-I-1): 1280x1024 @ 60 Hz in 19" [External]
WM: i3 (X11)
Theme: Numix-Frost-Light [GTK2/3]
Icons: Numix [GTK2], Numix-Square [GTK3]
Font: Lato (11pt) [GTK2/3]
Cursor: Adwaita (24px)
Terminal: lxterminal 0.4.1
Terminal Font: Monospace (9pt)
CPU: Intel(R) Pentium(R) Dual E2140 (2) @ 1.60 GHz
GPU: NVIDIA GeForce GTX 750 [Discrete] driver: nouveau
Memory: 1.34 GiB / 3.27 GiB (41%)
Swap: 0 B / 4.28 GiB (0%)
Disk (/): 71.31 GiB / 933.03 GiB (8%) - ext4

udevadm info -e | grep -e MEMORY_DEVICE -e MEMORY_ARRAY
E: MEMORY_ARRAY_LOCATION=System Board Or Motherboard
E: MEMORY_ARRAY_MAX_CAPACITY=4294967296
E: MEMORY_DEVICE_0_TOTAL_WIDTH=64
E: MEMORY_DEVICE_0_DATA_WIDTH=64
E: MEMORY_DEVICE_0_SIZE=2147483648
E: MEMORY_DEVICE_0_FORM_FACTOR=DIMM
E: MEMORY_DEVICE_0_LOCATOR=DIMM0
E: MEMORY_DEVICE_0_BANK_LOCATOR=BANK0
E: MEMORY_DEVICE_0_TYPE=DDR2
E: MEMORY_DEVICE_0_TYPE_DETAIL=Synchronous
E: MEMORY_DEVICE_0_SPEED_MTS=333
E: MEMORY_DEVICE_0_MANUFACTURER=Manufacturer0
E: MEMORY_DEVICE_0_SERIAL_NUMBER=SerNum0
E: MEMORY_DEVICE_0_ASSET_TAG=AssetTagNum0
E: MEMORY_DEVICE_0_PART_NUMBER=PartNum0
E: MEMORY_DEVICE_1_TOTAL_WIDTH=64
E: MEMORY_DEVICE_1_DATA_WIDTH=64
E: MEMORY_DEVICE_1_SIZE=2147483648
E: MEMORY_DEVICE_1_FORM_FACTOR=DIMM
E: MEMORY_DEVICE_1_LOCATOR=DIMM1
E: MEMORY_DEVICE_1_BANK_LOCATOR=BANK1
E: MEMORY_DEVICE_1_TYPE=DDR2
E: MEMORY_DEVICE_1_TYPE_DETAIL=Synchronous
E: MEMORY_DEVICE_1_SPEED_MTS=333
E: MEMORY_DEVICE_1_MANUFACTURER=Manufacturer1
E: MEMORY_DEVICE_1_SERIAL_NUMBER=SerNum1
E: MEMORY_DEVICE_1_ASSET_TAG=AssetTagNum1
E: MEMORY_DEVICE_1_PART_NUMBER=PartNum1
E: MEMORY_ARRAY_NUM_DEVICES=2

I prepared usb drive by this command:

dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/sdb conv=fsync oflag=direct status=progress

I use that hardware because, beside I still can, it is rather trouble free, not like today's hardware which has buggy BIOS (UEFI), is unstable (Ryzen CPU, RAM settings to default motherboard which are too optimistic), wear out fast (Intel 13xxx and 14xxx CPUs), have problematic network drivers (r8168), problematic devices (touchpad, i2c), AMD & NVIDIA GPUs drivers (yes, I use it but on nouveau), and etc. I read many about this on this forum and it looks like finding trouble free hardware for Linux is quite hard now.

Beside that, it don't have 20, but 18, especially not all components, beside keyboard which is from 1999 and still works good.
I want to go forward and see how far/long I can go with it.

Last edited by xerxes_ (2025-06-04 22:18:54)

Offline

#6 2025-06-04 23:06:00

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,730

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

The manual for your motherboard can be downloaded from https://www.asus.com/supportonly/p5lmx/helpdesk_manual/

The bios appears to be from AMI which was very common in those years and had a quirk that made selecting external boot devices tricky .

Connect the bootable usb drive.

Boot > enter the bios , goto advanced > usb configuration > legacy usb support
Set it to Enabled , save settings
reboot & enter bios
Goto Boot Menu > boot device priority
Select "1st boot device"
Use arrow keys (probably left/right) to change the device shown.
If it lists the usb drive, select it.

(Note that only devices that have been detected during post will be selectable .)

After selecting the usb drive you need to save settings and exit bios.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Online

#7 2025-06-04 23:57:03

kermit63
Member
Registered: 2018-07-04
Posts: 331

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

Not exactly what your looking for, but an alternative is to just use GRUB's iso booting feature to boot directly from an iso file stored in your hard drive. This can be done by adding a custom GRUB boot entry pointing directly at the iso file.

My /etc/grub.d/40_custom looks like this:

menuentry "Arch ISO" {
    set isofile="/livecd/arch.iso"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    set pqr="/dev/disk/by-uuid/$abc"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$pqr  img_loop=$isofile>
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#8 Yesterday 10:53:05

xerxes_
Member
Registered: 2018-04-29
Posts: 912

Re: [SOLVED] How to boot usb pendrive from grub for system rescue

Thanks for replays and help. I managed to boot from usb pendrive by grub just coping linux options from archiso (01-archiso-x86_64-linux.conf file). That was the command sequence in grub which worked:

grub> ls
grub> set root=(hd1)
grub> linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisosearchuuid=2025-05-01-10-09-37-00
grub> initrd /arch/boot/x86_64/initramfs-linux.img
grub> boot

That command

linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"

from file .../ARCH_202505/boot/grub/loopback.cfg didn't worked.

BTW that looks archiso pendrive when is mounted in my installed system:

sdb    iso9660 Joliet Extension ARCH_202505 2025-05-01-10-09-37-00                              
├─sdb1 iso9660 Joliet Extension ARCH_202505 2025-05-01-10-09-37-00                     0   100% /run/media/user/ARCH_202505
└─sdb2 vfat    FAT32            ARCHISO_EFI 6813-4861

Now I have some pointers how to boot other sources from grub.

Last edited by xerxes_ (Yesterday 11:03:49)

Offline

Board footer

Powered by FluxBB