Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
2175
views
Linking with GCC doesn't detect -fPIC flag
I am trying to link some files. Here is my command: gcc -T linker.ld -o Stack\ Berry.bin -ffreestanding -O2 -nostlib kernel.o boot.o -fPIC -lgcc How ever, I get this error: /usr/bin/ld: boot.o: relocation R_X86_64_32 against `.multiboot' can not be used when making a PIE object; recompile with -fPIC...
I am trying to link some files. Here is my command:
gcc -T linker.ld -o Stack\ Berry.bin -ffreestanding -O2 -nostlib kernel.o boot.o -fPIC -lgcc
How ever, I get this error:
/usr/bin/ld: boot.o: relocation R_X86_64_32 against `.multiboot' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
I have included the
-fPIC
argument, have I just put it in the wrong place? I haven't been able to find any thing for the syntax for this flag. Thanks!
Milo Banks
(21 rep)
Nov 13, 2018, 12:46 AM
• Last activity: Aug 5, 2025, 07:11 AM
0
votes
1
answers
60
views
How to Make grub multiboot menu come up only when booting from specific MBR hard drive
Sorry if this is an amateur question. I had an old PC of mine with a 320GB SATA hard disk (lets call it '**sdb**') which had a working Windows 7 installation. Now, i have a laptop which also has a 320GB SATA hard disk with Windows 10 installed on it (referred to as '**sda**'). I bought a SATA-to-USB...
Sorry if this is an amateur question.
I had an old PC of mine with a 320GB SATA hard disk (lets call it '**sdb**') which had a working Windows 7 installation. Now, i have a laptop which also has a 320GB SATA hard disk with Windows 10 installed on it (referred to as '**sda**').
I bought a SATA-to-USB adapter in order to use **sdb** and install Mint on it. I have repartitioned it like this:
[100 MB System Reserved Windows 7] [50GB Windows 7] [unallocated 70GB (to-be Linux Mint partition) [177GB Data Partition]
Structure of **sda** is:
[350MB System Reserved Windows 10] [97GB Windows 10] [98GB Local Disk D:] [102GB Local Disk E:]
I haven't yet installed Linux Mint.
What i want to do is:
1) leave the internal HDD (sda) untouched
2) install Linux Mint on the 70GB space.
3) Make it so that the GRUB multi boot menu comes up ONLY when i set BIOS to boot from the USB drive
4) (i) **[IMPORTANT]** when the USB HDD is disconnected and laptop is booted, the laptop should go directly to Windows 10 with no interruptions.
(ii) But when booted from the USB drive (after selecting it as the boot drive from BIOS), GRUB boot menu should come up to ask whether to boot Mint or Windows 7
5) I dont mind if Windows 10 comes up in the boot menu.
boot-info paste: https://paste.debian.net/hidden/26b1d460/
The questions is: What am i supposed to select under 'Select device for bootloader installation' in order to achieve my goal? Or how do i actually go through the Mint installation for this purpose?
Notes:
Both Hard Drives are MBR and the laptop is HP Elitebook 8470p. Windows 7 exists only for the sake of archival (wont be booted usually). If possible please do not suggest removing the internal HDD and then install Mint.
Related questions: https://unix.stackexchange.com/questions/66895/grub-with-two-hard-drives
https://unix.stackexchange.com/questions/374514/grub-booting-only-when-the-drive-is-explicitly-selected
John Yes
(11 rep)
Jul 17, 2025, 08:05 AM
• Last activity: Jul 19, 2025, 12:18 PM
6
votes
1
answers
5171
views
Triple boot with systemd-boot: How to boot Windows 10 and 11 directly without Windows boot manager?
I recently installed Windows 11 on my home PC in addition to Arch Linux but my wife isn't ready to switch until after her exams, so we keep Windows 10 around for now, leading to a very convoluted booting situation: 1. On boot, systemd boot manager will wait for 3 seconds with a default of Windows 10...
I recently installed Windows 11 on my home PC in addition to Arch Linux but my wife isn't ready to switch until after her exams, so we keep Windows 10 around for now, leading to a very convoluted booting situation:
1. On boot, systemd boot manager will wait for 3 seconds with a default of Windows 10 if nothing is chosen manually. When choosing Arch Linux, everything is fine and it will boot that, however when choosing Windows:
2. It will boot Windows 11 and only then show the Windows boot manager, which will show Windows 10 and 11 but not Arch Linux (else this could be used directly) and wait 30 seconds and will boot whatever is booted last. If this Windows 11 is chosen, it will start it, however if Windows 10 is chosen:
3. It will restart again, showing systemd boot manager again. Now if one chooses Windows 10, it will finally start it.
My goal is to just have the following 3 entries in my systemd-boot menu, how can I achieve that?
1. Arch Linux
2. Windows 10 (default)
3. Windows 11
And chosing either Windows option should boot that directly. I looked around in the
/boot/efi/Microsoft/Boot
folder but the only .efi
files are bootmgfw.efi
and bootmgr.efi
.
## $ bootctl list
Boot Loader Entries:
title: Arch Linux
id: arch.conf
source: /boot/loader/entries/arch.conf
linux: /vmlinuz-linux-ck-skylake
initrd: /intel-ucode.img
/initramfs-linux-ck-skylake.img
options: root=/dev/nvme0n1p5 rw nvidia-drm.modeset=1 systemd.unified_cgroup_hierarchy=false
title: MemTest86
id: memtest86-efi.conf
source: /boot/loader/entries/memtest86-efi.conf
title: Windows 10 (default)
id: windows.conf
source: /boot/loader/entries/windows.conf
title: Windows Boot Manager
id: auto-windows
source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
title: Reboot Into Firmware Interface
id: auto-reboot-to-firmware-setup
source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
## /boot/loader/loader.conf
timeout 3
console-mode max
default windows.conf
## /boot/loader/entries/windows.conf
title Windows 10
efi /EFI/Microsoft/Boot/bootmgfw.efi
Konrad Höffner
(1028 rep)
Jan 30, 2022, 09:31 AM
• Last activity: Jun 4, 2025, 11:08 PM
0
votes
1
answers
1955
views
Grub2 does not detect my wifi slax OS
I have installed wifi slax OS from a usb on a partition along side with windows 10 and the installation process install also grub2 when finished I reboot and grub2 show only windows 10 loader. So, how I can list all available OS to boot? my grup.cfg file contains: ---------- # # DO NOT EDIT THIS FIL...
I have installed wifi slax OS from a usb on a partition along side with windows 10 and the installation process install also grub2 when finished I reboot and grub2 show only windows 10 loader.
So, how I can list all available OS to boot?
my grup.cfg file contains:
----------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 68c96891-4e12-46ff-a9c5-b8c46a361698
else
search --no-floppy --fs-uuid --set=root 68c96891-4e12-46ff-a9c5-b8c46a361698
fi
if loadfont /usr/share/grub/dejavusansmono.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 68c96891-4e12-46ff-a9c5-b8c46a361698
else
search --no-floppy --fs-uuid --set=root 68c96891-4e12-46ff-a9c5-b8c46a361698
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/Wifislax/Sans-10.pf2
loadfont ($root)/boot/grub/themes/Wifislax/Sans-12.pf2
loadfont ($root)/boot/grub/themes/Wifislax/Sans-14.pf2
insmod png
set theme=($root)/boot/grub/themes/Wifislax/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-EC023C1B023BE96A' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 EC023C1B023BE96A
else
search --no-floppy --fs-uuid --set=root EC023C1B023BE96A
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
----------
Ali Habbash
(111 rep)
Jun 22, 2017, 08:05 PM
• Last activity: Jun 1, 2025, 06:03 AM
0
votes
2
answers
88
views
Failing to Multiboot OpenBSD - stuck at partitions and Linux GRUB
I am trying my hand at learning `multibooting`, so far my target PC has `Antix-Linux ext4` on one partition, `FreeBSD UFS` on another, `ExFat` common data on a 3rd, Target PC has been partitioned with GPARTED and `GPT partitioning scheme` as under: My PC has `BIOS` not `UEFI`. ``` /dev/sda1 - 1 GB -...
I am trying my hand at learning
multibooting
, so far my target PC has Antix-Linux ext4
on one partition, FreeBSD UFS
on another, ExFat
common data on a 3rd, Target PC has been partitioned with GPARTED and GPT partitioning scheme
as under:
My PC has BIOS
not UEFI
.
/dev/sda1 - 1 GB - fat32 - flags - boot, esp
/dev/sda2 - 3 GB - flags - linux-swap
/dev/sda3 - 15 GB - ext4 - Antix_Linux
/dev/sda4 - 250 GB - exfat
/dev/sda5 - 15 GB - freebsd_UFS
/dev/sda6 - 0.5 GB - openbsd boot (formerly type 'EF' now type '0D')
/dev/sda7 - rest space 15 GB -openbsd 'A6' type UFS
1] OpenBSD with Ventoy
- installed from the install77.iso
file, downloaded filesets
from http
since it did not read from cd0
or disk
, got stuck at installboot
. Then it was showing error EFI device busy
, and since I don't have EFI, I changed the /dev/sda6
from type EF
to 0D
(boot bios) and installboot successfully completed.
Then I rebooted, and trying to add a menuentry in 40_custom
grub file in Antix-Linux, whose grub boots the system, but update-grub
is showing warning discarded incorrectly nested partition hostdisk/dev/sda,gpt7,bsd(1-14)
May you please extend your help in these cases. Regards.
Spandan
(101 rep)
May 4, 2025, 10:21 AM
• Last activity: May 13, 2025, 05:22 PM
1
votes
1
answers
53
views
How should I approach multibooting Windows 11, Fedora 41, and openSUSE Tumbleweed?
Ubuntu (specifically Kubuntu) 24.04 was my first introduction to the Linux world. I stuck with it for a couple of months trying to learn the basic ins and outs of Linux and get comfortable with it, dualbooting alongside Windows 11 on my laptop. As time went on I realized how much I disliked "stable"...
Ubuntu (specifically Kubuntu) 24.04 was my first introduction to the Linux world. I stuck with it for a couple of months trying to learn the basic ins and outs of Linux and get comfortable with it, dualbooting alongside Windows 11 on my laptop. As time went on I realized how much I disliked "stable" distros; Ubuntu's packages are disgustingly outdated and that left a bitter taste of my first impression of Linux, particularly because my hardware is modern and I needed better support.
Because of that I distrohopped to Fedora 40 KDE, then stuck with it for almost a year, keeping my old Kubuntu partition just in case, and then deleting it later once I got comfortable. Wayland support is surprisingly great for integrated graphics laptops. Just out of curiosity now, I want to try out openSUSE Tumbleweed on this laptop, see if it provides the same or better experience for me. But I want to keep Fedora 41 on my system just in case. How exactly do I achieve this?
The following screenshot is of my partition layout currently *(I know I should have a /home partition by now considering I've already distrohopped and doing it again is exhausting without one, but I'm lazy)*. If you look to the left, you'll see there's a /zram0 virtual disk with linuxswap partition, probably added by Fedora's BTRFS filesystem when I installed it:
Fastfetch output just in case it's needed:
If there's any other information needed from me, ask and I'll answer in the replies (or edit this post if I can).


yes.
(11 rep)
Jan 25, 2025, 03:51 PM
• Last activity: Jan 26, 2025, 09:01 AM
0
votes
0
answers
50
views
Best disk configuration when multibooting
### Basic Structure ## I have 2 SSDs in my laptop, one 256gb and 512gb. The configuration I want is to keep my data on 512gb and OS(es) on 256gb (multiple distros hopefully). My question is about how to best partition my disks. I don't planning on using Windows with this config, so no problems about...
### Basic Structure ##
I have 2 SSDs in my laptop, one 256gb and 512gb. The configuration I want is to keep my data on 512gb and OS(es) on 256gb (multiple distros hopefully). My question is about how to best partition my disks. I don't planning on using Windows with this config, so no problems about that.
Specifically, should I
- make a separate / and /home when I'm keeping my data in a separate drive (and symlink the folders).
- make different /boot for the distros so it is easy to delete just one later without messing with others.
- make a different /swap for each distro or just use one common partition
## My planned distros ##
I am not sure how useful this is while answering, but my plan is to keep one stable distro like Fedora Silverblue, while I distrohop and use stuff like void linux, arch, openSuse as my other distro.
### My experience ###
Again, cannot comment on how relevant this is, but I have been using Linux for the past year or so, and I have some elementary proficiency ie I can troubleshoot a bit and am not completely new to the terminal.
Let me know if any more information is needed.
Thanks
defectedWBC
(1 rep)
Oct 7, 2024, 11:17 AM
0
votes
0
answers
68
views
Install a second Fedora on same machine / New disk
Is it possible to install a second Fedora on the same machine without wrecking all installs. I'm currently having a dual boot Win10/Fedora but this Fedora install is rolling from Fedora 30, so I want to clean it up, being able to grab some old config from the former Fedora install. I've a new disk t...
Is it possible to install a second Fedora on the same machine without wrecking all installs.
I'm currently having a dual boot Win10/Fedora but this Fedora install is rolling from Fedora 30, so I want to clean it up, being able to grab some old config from the former Fedora install.
I've a new disk to install the new Fedora (sdc 1To), which I want to use as LVM & xfs that's why I need to know if I need a new EFI part:
sdc
sdd
├─sdd1
├─sdd2 vfat FAT32 xxxx
├─sdd3 ntfs xxxx xxxxxxxx 41,2G 52% /DATA
├─sdd4 ext4 1.0 root xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 51G 30% /
├─sdd5 vfat FAT32 efi xxxxx 491,9M 4% /boot/efi
└─sdd6 ext4 1.0 Home xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3,5G 94% /home
Can I use the existing EFI partition or I need to create a new one on
/dev/sdc
and add a chainloader to be able to boot from the /dev/sdd5
which is the former EFI.
# ls /boot/efi/EFI/
BOOT fedora
admstg
(831 rep)
Sep 25, 2024, 07:18 AM
0
votes
1
answers
76
views
SSD Multi-Boot Grub Trouble
I have 3 Linux-Distros installed on a SSD (Ubuntu, Parrot, Kali). There are all separated from each other, meaning they don't share a ```/home``` partition or anything like that. I also have no swap partitions. I had this idea of a portable drive (in my case a SSD) containing a couple of distros tha...
I have 3 Linux-Distros installed on a SSD (Ubuntu, Parrot, Kali). There are all separated from each other, meaning they don't share a
/home
partition or anything like that. I also have no swap partitions.
I had this idea of a portable drive (in my case a SSD) containing a couple of distros that I could carry around and simply plug into any computer and start working from there. The grub used for this SSD is managed from Ubuntu.
Now the problem I have is that all the computers with whom I worked so fare also had other SSD's plugged into them as well. So the existing Grub entries were invalid every time I switched devices, because sometimes my SSD was mounted to /dev/sda/, sometimes to /dev/sdb/ etc. The only entry that was always working was of course the Ubuntu one. Additionally, most of the time when this happened I could still select on the other boot entries, but then I would be prompted to the initramfs rescue console, informing me that my memory was corrupt somwhow. I would then fix the issue by executing -y
and the I would be able to boot into the OS. Obviously my memory was neither corrupt nor would this fix the problem as it again wont let me boot into it using another device without doing that initramfs console thing.
My question now is, is it possible to create like "permanent" grub entries that work regardless on where the SSD is mounted on? For example using uuid's that - as far as I know - always should stay the same.
---
(I even tried to install a grub for each linux distro separately so I could go into boot-options and simply select the grub from each one. But despite of those EFI files existing on the EFI partition, my primary computer doesn't recognize them (except Ubuntu). However my second computer does. Maybe because the second one created them? I don't know and I am certain that there is a better solution to this than having n grubs installed at one place.)
Pascal Vallaster
(1 rep)
Apr 30, 2024, 05:19 PM
• Last activity: May 8, 2024, 06:44 PM
2
votes
0
answers
1803
views
How to make a common /boot partition for multiple linux distros?
I'm trying to multiboot windows along with two linux distros namely Parrot OS Electro Ara and Ubuntu 20.04 and grub and bootloader was initially installed by Parrot OS. So to not interfere that I installed Ubuntu without bootloader i.e. by ```ubiquity -b``` because I just want to use the grub of Par...
I'm trying to multiboot windows along with two linux distros namely Parrot OS Electro Ara and Ubuntu 20.04 and grub and bootloader was initially installed by Parrot OS. So to not interfere that I installed Ubuntu without bootloader i.e. by
Here I also attach the files that were present in the
-b
because I just want to use the grub of Parrot itself.
But I used the same **/boot** partition (/dev/nvme0n1p9
) as mountpoint for both OS.
Here are my mount points from Parrot OS by
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part /boot/efi
├─(windows partitions were hided)
├─nvme0n1p7 259:7 0 200M 0 part
├─nvme0n1p8 259:8 0 4G 0 part [SWAP]
├─nvme0n1p9 259:9 0 1G 0 part /boot
├─nvme0n1p10 259:10 0 20G 0 part /
├─nvme0n1p11 259:11 0 40G 0 part /opt
├─nvme0n1p12 259:12 0 40G 0 part
│ └─luks-...(UUID Hided) 253:0 0 40G 0 crypt /home
└─nvme0n1p15 259:15 0 47.4G 0 part
Note: I had shared same /opt
and /boot
(efi partition is shared by default)
I'm getting a message like ubuntu was detected on the /dev/nvme0n1p15 but when I see the source code or boot from grub screen it points me directly to parrot OS.
The thing is parrot OS was booted by initramfs and vmlinuz file of ubuntu and it got booted into parrot without a problem. Similarly when I tried -grub
from ubuntu I says parrot OS but still it uses kernels (5.16 and 5.18) of Parrot OS to boot into ubuntu due to which I got errors due to initramfs but no error when I boot from its kernel 5.15.
Here is my grub-customizer page to show how it looks like. (The custom ones are I made them to boot temporarily into Ubuntu image).

/boot
folder before installing, after installing ubuntu and after running update-grub.
**Before installing Ubuntu (only Parrot and Windows)**
config-5.16.0-12parrot1-amd64
config-5.18.0-1parrot1-amd64
efi
grub
initrd.img-5.16.0-12parrot1-amd64
initrd.img-5.18.0-1parrot1-amd64
System.map-5.16.0-12parrot1-amd64
System.map-5.18.0-1parrot1-amd64
vmlinuz-5.16.0-12parrot1-amd64
vmlinuz-5.18.0-1parrot1-amd64
**After installing ubuntu and running update grub from it by chrooting**
total 256M
drwxr-xr-x 2 root root 4.0K செப். 20 16:36 efi
drwxr-xr-x 5 root root 4.0K செப். 20 16:36 grub
lrwxrwxrwx 1 root root 28 செப். 20 16:36 initrd.img -> initrd.img-5.15.0-46-generic
-rw-r--r-- 1 root root 117M செப். 20 16:36 initrd.img-5.15.0-46-generic
-rwxr-xr-x 1 root root 94M செப். 20 16:36 initrd.img-5.16.0-12parrot1-amd64
-rw-r--r-- 1 root root 14M செப். 20 16:36 initrd.img-5.18.0-1parrot1-amd64
lrwxrwxrwx 1 root root 32 செப். 20 16:36 initrd.img.old -> initrd.img-5.18.0-1parrot1-amd64
-rw-r--r-- 1 root root 179K செப். 20 16:36 memtest86+.bin
-rw-r--r-- 1 root root 181K செப். 20 16:36 memtest86+.elf
-rw-r--r-- 1 root root 181K செப். 20 16:36 memtest86+_multiboot.bin
-rw------- 1 root root 6.0M செப். 20 16:36 System.map-5.15.0-46-generic
-rwxr-xr-x 1 root root 83 செப். 20 16:36 System.map-5.16.0-12parrot1-amd64
-rwxr-xr-x 1 root root 83 செப். 20 16:36 System.map-5.18.0-1parrot1-amd64
lrwxrwxrwx 1 root root 25 செப். 20 16:36 vmlinuz -> vmlinuz-5.15.0-46-generic
-rw-r--r-- 1 root root 11M செப். 20 16:36 vmlinuz-5.15.0-46-generic
-rwxr-xr-x 1 root root 7.1M செப். 20 16:36 vmlinuz-5.16.0-12parrot1-amd64
-rwxr-xr-x 1 root root 7.2M செப். 20 16:36 vmlinuz-5.18.0-1parrot1-amd64
**Finally running update-grub from Parrot OS and removed symlinks**
config-5.16.0-12parrot1-amd64
config-5.18.0-1parrot1-amd64
efi
grub
initrd.img-5.15.0-46-generic
initrd.img-5.16.0-12parrot1-amd64
initrd.img-5.18.0-1parrot1-amd64
memtest86+.bin
memtest86+.elf
memtest86+_multiboot.bin
System.map-5.15.0-46-generic
System.map-5.16.0-12parrot1-amd64
System.map-5.18.0-1parrot1-amd64
vmlinuz-5.15.0-46-generic
vmlinuz-5.16.0-12parrot1-amd64
vmlinuz-5.18.0-1parrot1-amd64
The solution I'm wanting is to have grub boot options like
- Parrot
- Advance options for Parrot
- Ubuntu
- Advance options for Ubuntu
- Windows
Thanks in advance for the help.
Ganishk D
(21 rep)
Sep 20, 2022, 06:07 PM
• Last activity: Oct 13, 2023, 12:28 AM
0
votes
1
answers
148
views
Reboot into new OS image Remotely
I have a few old rpi 3b+ still running stretch which i would like to upgrade to either bullseye or buster. They are all remote and i access them via AnyDesk or reverse ssh tunnels as a backup. I have attempted to simply upgrade into buster/bullseye on a rpi at home, with the same setup as these remo...
I have a few old rpi 3b+ still running stretch which i would like to upgrade to either bullseye or buster. They are all remote and i access them via AnyDesk or reverse ssh tunnels as a backup.
I have attempted to simply upgrade into buster/bullseye on a rpi at home, with the same setup as these remote ones. My hope was that i would upgrade, then reverse ssh or AnyDesk into it after the upgrade, but they never managed to upgrade properly (attempted about 6 tiems with multiple variations and always failed for one reason or another). I can't risk not being able to remote login, so i'm looking at other options.
Ideally here is what i'd like to do:
1. Remote log into my rpi.
2. Download a pre-configured image of buster/bullseye (with all the things i need, Anydesk etc..).
3. Reboot the rpi into the newly downloaded OS image.
I've looked into using some multiboot tools, but they generally need you to do all the setup on a separate SD ard / USB etc. I need to be able to perform all these remotely via AnyDesk or ssh, and on the SD card that contains the currently running OS.
Anyone able to give me some pointers?
LecauseAndThePi
(177 rep)
Sep 15, 2023, 01:21 PM
• Last activity: Sep 15, 2023, 01:44 PM
0
votes
1
answers
224
views
How to directly boot on GRUB installed on a specific partition instead of "bios_grub" partition?
Here are the partitions of my SSD: ``` $sudo parted -l Model: ATA SanDisk SDSSDA-1 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 106MB 105MB fat32 EFI system partition boot, esp 2 106MB 12...
Here are the partitions of my SSD:
$sudo parted -l
Model: ATA SanDisk SDSSDA-1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
2 106MB 123MB 16,8MB Microsoft reserved partition msftres
3 123MB 134GB 134GB ntfs Basic data partition msftdata
4 134GB 134GB 537MB ntfs hidden, diag
5 134GB 852GB 718GB ext4
6 852GB 872GB 20,0GB linux-swap(v1) swap
7 872GB 872GB 1049kB bios_grub
8 872GB 1000GB 128GB btrfs boot, esp
On the partitions 5 and 8, GRUB is also installed. GRUB installed on the partition 5 can load Ubuntu which is installed on the same partition or Windows which is installed on the partition 3. GRUB installed on the partition 8 can load Parrot OS which is installed on the same partition and Ubuntu which is installed on the partition 5.
When the GRUB partition (which is on the partition 7) is loaded at startup, GRUB command-line appears and I need to manually type some commands to load the GRUB located on the partition 5 or 8 depending on the OS I want to use.
I would like to configure GRUB in order to directly have a menu that asks to me which one of the 3 OSes I would like to load.
How to configure this?
Pierre
(133 rep)
Aug 14, 2023, 03:13 PM
1
votes
1
answers
361
views
Hide entries in grub menu when device is unavailable?
I have several menuentries in my **grub2** menu, some of which point to removable devices (Ventoy, Windows, etc). Is there any way to configure grub to automatically and temporarily hide (or grey out, or mark) the menuentries for which the device/partition/label they point to is unavailable? I was u...
I have several menuentries in my **grub2** menu, some of which point to removable devices (Ventoy, Windows, etc). Is there any way to configure grub to automatically and temporarily hide (or grey out, or mark) the menuentries for which the device/partition/label they point to is unavailable?
I was unable to obtain any information regarding this, so I suppose the answer will likely be a resounding "not possible," but...
Luis A. Florit
(509 rep)
Jun 18, 2023, 05:51 AM
• Last activity: Jun 18, 2023, 03:37 PM
1
votes
1
answers
189
views
Multi-boot Linux-mate with Windows 7, 10 & 11
I have a mini-XTA box 64b Intel with UEFI disabled. It has been running Mate, W7 & W10 for some time just fine. Mate and W7 are on one SSD and W10 is on a second SSD. GRUB finds and starts these 3 fine. So I wanted to play with W11 too. I shrunk the W10 partition and installed W11 in the freed space...
I have a mini-XTA box 64b Intel with UEFI disabled. It has been running Mate, W7 & W10 for some time just fine. Mate and W7 are on one SSD and W10 is on a second SSD. GRUB finds and starts these 3 fine. So I wanted to play with W11 too. I shrunk the W10 partition and installed W11 in the freed space using a USB stick.
Of course MS thinks they have the only bootloader and overwrites the grub. But the MS bootloader would only recognize the W11 partition on one SSD and the W7 partition on the other SSD.
I used a live Mate USB reassert grub, but it still would only find Mate, W7 & W10. So in W10 I used Easy-BCD to add a boot entry pointing to the W11 partition. Now from the grub W10 entry I get into the Windows boot loader with a W10 & W11 choice. Selecting W10 enters W10 immediately. But selecting W11 reboots first into grub and then selecting W10 grub entry again boots W11.
I’d like to get to all the installed OS directly from grub. Is this doable?
From Oldfred's links I re-learned about BIOS/UEFI MBR/GPT. First, since my Linux/W7 was installed with UEFI disabled, I cant expect to use UEFI/GPT on the second disk partitions. Second, allowing windows to create partitions on its own creates multiboot problems, as each OS wants to set up multiple partitions. By pre-partitioning the entire disk, I can force W10/W11 to install everything within a single partition.
It also seemed prudent to unplug the sati cable from the Linux/W7 disk to insure there was no funny business between drives. This all works if I want to use the MS BCD to select which W10/11 I want. But I want to directly load W10 or W11 from GRUB.
But there is only one BCD store on the disk (in the W11 partition). I cant figure out how to add that to the W10 partition so each has its own BCD with only one entry. Then GRUB should find both and I'd have what I want.
kjo
(21 rep)
May 6, 2023, 03:20 AM
• Last activity: May 8, 2023, 11:04 PM
0
votes
1
answers
50
views
A while back - A Unix distribution with installation media that could boot on several platforms?
Quite a while I saw a distribution of a *nix operating system where the installation media (CD? DVD?) contained binaries for several hardware platforms, and could boot and install directly on _several_ of these. My best bet is that this was either OpenBSD or NetBSD but I cannot remember when or wher...
Quite a while I saw a distribution of a *nix operating system where the installation media (CD? DVD?) contained binaries for several hardware platforms, and could boot and install directly on _several_ of these. My best bet is that this was either OpenBSD or NetBSD but I cannot remember when or where I saw this.
I would like to have a closer look at the boot code making this possible.
My question is, what was it I saw back then?
Thorbjørn Ravn Andersen
(1064 rep)
Jan 13, 2017, 04:17 PM
• Last activity: Feb 12, 2023, 03:54 AM
0
votes
0
answers
571
views
How to figure out the necessary boot parameters to boot an iso file from a multiboot usb driver?
This is my first posting here and I would like to have asked a general question, namely "Is there a general procedure to deduce the boot parameters necessary to boot from an iso file on an usb drive, from the content of the iso file AND of another usb drive onto which the target iso file has been 'd...
This is my first posting here and I would like to have asked a general question, namely "Is there a general procedure to deduce the boot parameters necessary to boot from an iso file on an usb drive, from the content of the iso file AND of another usb drive onto which the target iso file has been 'dd-ed'?" as I am not sure of how I should interpret the information on the introductory tour as to the kind of questions appreciated and I am therefore presenting one of 3 concrete actual practical problems I am struggling with.
If there is excessive verbose it is because I understood that you prefer lots of detail. Let me know if I have overdone and it won't happen again.
I am trying to add Void Linux iso to the multiboot hybrid usb I travel with.
Testing is being done on a Bios machine (Fujitsu Lifebook) and I am getting dracut warnings like
*
could not boot
* /dev/root does not exist
* mount: /sysroot: special device /dev/mapper/live-rw does not exist
The structure of the usb is the following:
sdc 8:32 1 57.8G 0 disk
├─sdc1 8:33 1 33M 0 part # bios boot
├─sdc2 8:34 1 512M 0 part # ESP
├─sdc3 8:35 1 8G 0 part /run/media/anon/artix
└─sdc4 8:36 1 49.2G 0 part /run/media/anon/ISOs
Where sdc3 contains a minimal, base install of artix Linux which holds Grub.
Path to Void's iso file in sdc4 is: /MocaccinoOS-MATE-0.20220903.iso
I have also expanded its content to a folder in sdc4: /loop_mounting/Void
I have been trying different menu entries by varying which version (iso vs expanded) and which value I asign to 'root' in the linux command line - ('VOID_LIVE' vs 'ISOs') and ('root:live=CDLABEL=' vs 'root_LABEL=').
The choice of 'VOID_LINUX' was due to the output below:
[esprimo-II wan]# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 iso966 Jolie VOID_LIVE 2022-10-01-18-20-01-00 0 100% /mnt/iso
The initial part of my grub.cfg grub.cfg (i.e. that before the entries):
# Config for GNU GRand Unified Bootloader (GRUB)# /boot/grub/grub.cfg
# januari 12, 2023
# Timeout for menu
set timeout=-1
# Default boot entry
set default=0
# Menu Colours
set menu_color_normal=white/black
set menu_color_highlight=white/green
# persistent block device naming
# define globally (i.e outside any menuentry)
insmod search_fs_uuid
insmod gzio
insmod part_gpg
insmod part_msdos
insmod fat
insmod loopback
insmod iso9660
insmod ext2
insmod all_video
set gfxpayload=keep
set root=(hd0,gpt4)
The entries I used in the initial tests fo this post:
menuentry "void iso" {
set isofile='/void-live-x86_64-20221001-xfce.iso'
loopback loop $isofile
probe --label --set=cd_label (loop)
bootoptions="iso-scan/filename=$isofile findiso=$isofile root=live:CDLABEL=$cd_label init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="iso-scan/filename=$isofile findiso=$isofile root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="iso-scan/filename=$isofile findiso=$isofile root=live:CDLABEL=ISOs init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="iso-scan/filename=$isofile findiso=$isofile root=LABEL=ISOs init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="iso-scan/filename=$isofile findiso=$isofile root=LABEL=VOID_LINUX init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
linux (loop)/boot/vmlinuz $bootoptions
initrd (loop)/boot/initrd
}
menuentry "void expanded" {
bootoptions="root=live:CDLABEL=ISOs init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8
# bootoptions="root=LABEL=ISOs init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="root=live:CDLABEL=VOID_LINUX init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
# bootoptions="root=LABEL=VOID_LINUX init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
linux /loop_mounting/Void/boot/vmlinuz $bootoptions
initrd /loop_mounting/Void//boot/initrd
}
a) 'root=live:CDLABEL=$cd_label' ended with dracut warnings:
- "could not boot"
- "/dev/disk/by-label/VOID_LIVE does not exist"
- "/dev/root does not exist"
more at rdsosreport_1_0117 (attach.)
b) 'root=live:CDLABEL=VOID_LIVE' - I did not run this one because in the trial above it was reported that the value of 'cdlabel\ was "VOID_LIVE"
c) 'root=live:CDLABEL=ISOs' - dracut warning: 'can't mount root file system' after
"mount: /sysroot: special device /dev/mapper/live-rw does not exist"
more at rdsosreport_3_0117 (attach.)
d) 'root=LABEL=VOID_LIVE' - dracut warnings:
- "could not boot"
- "/dev/disk/by-label/VOID_LIVE does not exist"
more at rdsosreport_4_0117 (attach.)
e) 'root=LABEL=ISOs' - - same result as I.c above
more at rdsosreport_5_0117 (attach.)
II) When booting from "void expanded":
a) 'root=live:CDLABEL=VOID_LIVE' - same result as in I.a
more at rdsosreport_6_0117 (attach.)
b) 'root=live:CDLABEL=ISOs' same result as in I.c
more at rdsosreport_7_0117 (attach.)
c) 'root=LABEL=VOID_LIVE' - -dracut warnings:
- "could not boot"
- "/dev/disk/by-label/VOID_LIVE does not exist"
more at rdsosreport_8_0117 (attach.)
d) 'root=LABEL=ISOs' - dracut warning: 'can't mount root file system'
more at rdsosreport_9_0117 (attach.)
`
Another usb drive, with iso file dd-ed onto it, boots nicely, and the
iso on the target multi usb driver has the correct check sum.
The structure of the iso file when loop mounted is:
├── boot
│ ├── grub
│ │ ├── efiboot.img
│ │ ├── fonts
│ │ │ └── unicode.pf2
│ │ ├── grub.cfg
│ │ └── grub_void.cfg
│ ├── initrd
│ ├── isolinux
│ │ ├── boot.cat
│ │ ├── chain.c32
│ │ ├── isolinux.bin
│ │ ├── isolinux.cfg
│ │ ├── ldlinux.c32
│ │ ├── libcom32.c32
│ │ ├── libutil.c32
│ │ ├── splash.png
│ │ └── vesamenu.c32
│ └── vmlinuz
└── LiveOS
└── squashfs.img
Here how lsblk lists the loop mounted iso file:
NAME LABEL MOUNTPOINT
loop0 VOID_LIVE /mnt/iso
These are the three boot entries in the loop mounted iso (which I copied into the target usb) is:
1 - /boot/isolinux/isolinux.cfg:
LABEL linux
MENU LABEL Void Linux 5.19.10_1 x86_64
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd
root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8 rd.live.overlay.overlayfs=1
LABEL linuxram
2 - /boot/grub/grub_void.cfg
set pager="1"
set locale_dir="(${voidlive})/boot/grub/locale"
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
fi
insmod font
if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
insmod png
background_image "(${voidlive})/boot/isolinux/splash.png"
fi
if [ cpuid -l ]; then
menuentry "Void Linux 5.19.10_1 (x86_64)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=us \
locale.LANG=en_US.UTF-8 rd.live.overlay.overlayfs=1
initrd (${voidlive})/boot/initrd
}
menuentry "Void Linux 5.19.10_1 (x86_64) (RAM)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=us \
locale.LANG=en_US.UTF-8 rd.live.overlay.overlayfs=1 rd.live.ram
initrd (${voidlive})/boot/initrd
}
fi
3- /boot/grub/grub.cfg
insmod usbms
insmod usb_keyboard
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod udf
insmod ext2
insmod reiserfs
insmod ntfs
insmod hfsplus
insmod linux
insmod chain
search --file --no-floppy --set=voidlive "/boot/grub/grub_void.cfg"
source "(${voidlive})/boot/grub/grub_void.cfg"
This is how lsblk lists the dd-ed ('VOID-LIVE') usb:
NAME LABEL MOUNTPOINT
sdc VOID_LIVE
├─sdc1 VOID_LIVE /run/media/arthur/VOID_LIVE
└─sdc2 grub_uefi
The only differences I was able to identify between the tree structure of the loop mounted and of the LIVE (i.e. the dd-ed one) versions of the original iso file is the presence of a grub-uefi partition in the tree-structure of the LIVE usb and their respective paths as shown in the filemanager's box.
My intuition is that difference in paths must be related to labels which is what I use to point at my isos.
This is the content of the menu entry shown by the LIVE usb's GRUB-menu when I press 'e':
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz root=live:CDLABEL=VOID_LABEL ro init=/sbin/init rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap vconsole.unicode=1 locale.LANG=en_us.UTF-8 rd.live.overlay.overlayfs=1
initrd (${voidlive})/boot/initrd
I have wondered how the variable 'voidlive'(which I suspect holds the solution) gets its value. I have no idea whatsoever except a suspicion that it may be negotiated between files '/boot/grub/grub.cfg' and '/boot/grub/grub_void.cfg'.
I have, since I started writing this post, done some more attempts which I may report here if desirable.
The entry used today was:
menuentry "Void ISO-Live"{
set root='hd0,gpt4'
set gfxpayload="keep"
linux /loop_mounting/Void/boot/vmlinuz root=live:CDLABEL=ISOs ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 rd.debug=1 loglevel=4 gpt add_efi_memmap vconsole.unicode=1 \
locale.LANG=en_us.UTF-8 rd.live.overlay.overlayfs=1
sleep 3
initrd /loop_mounting/Void/boot/initrd
}
It produced 'rdsosreport_12_230120.txt' which like the ones mentioned above are to large for me to dare including them in the post. I imagine I must find some place to put them online, as I did not see any links for attachments.
Here I will briefly quote a few of those parts I found most interesting:
1)
//lib/dracut/hooks/mount/99-mount-root.sh@130(mount_root): '[' -f /sysroot/forcefsck ']'
//lib/dracut/hooks/mount/99-mount-root.sh@131(mount_root): '[' -f /sysroot/.autofsck ']'
/init@249(): ismounted /sysroot
/lib/dracut-lib.sh@568(ismounted): findmnt /sysroot
/init@250(): usable_root /sysroot
/lib/dracut-lib.sh@742(usable_root): local _i
/lib/dracut-lib.sh@744(usable_root): '[' -d
/sysroot ']'
/lib/dracut-lib.sh@746(usable_root): for _i in "$1"/usr/lib*/ld-*.so "$1"/lib*/ld-*.so
/lib/dracut-lib.sh@747(usable_root): '[' -e '/sysroot/usr/lib*/ld-*.so' ']'
/lib/dracut-lib.sh@746(usable_root): for _i in "$1"/usr/lib*/ld-*.so "$1"/lib*/ld-*.so
/lib/dracut-lib.sh@747(usable_root): '[' -e '/sysroot/lib*/ld-*.so' ']'
/lib/dracut-lib.sh@750(usable_root): for _i in proc sys dev
/lib/dracut-lib.sh@751(usable_root): '[' -e /sysroot/proc ']'
/lib/dracut-lib.sh@751(usable_root): return 1
/init@251(): warn '/sysroot has no proper rootfs layout, ignoring and removing offending mount hook'
/lib/dracut-lib.sh@66(warn): check_quiet
/lib/dracut-lib.sh@488(check_quiet): '[' -z yes ']'
/lib/dracut-lib.sh@67(warn): echo 'dracut Warning: /sysroot has no proper rootfs layout, ignoring and removing offending mount hook'
/lib/dracut-lib.sh@68(warn): echo 'dracut Warning: /sysroot has no proper rootfs layout, ignoring and removing offending mount hook'
dracut Warning /sysroot has no proper rootfs layout, ignoring and removing offending mount hook
/init@252(): umount /sysroot
/init@253(): rm -f -- /lib/dracut/hooks/mount/99-mount-root.sh
2)
/init@257(): _i_mount=20
/init@258(): '[' 20 -gt 20 ']'
/init@242(): :
/init@243(): ismounted /sysroot
/lib/dracut-lib.sh@568(ismounted): findmnt /sysroot
/init@247(): for f in $hookdir/mount/*.sh
/init@248(): '[' -f '/lib/dracut/hooks/mount/*.sh' ']'
/init@249(): ismounted /sysroot
/lib/dracut-lib.sh@568(ismounted): findmnt /sysroot
/init@257(): _i_mount=21
/init@258(): '[' 21 -gt 20 ']'
/init@259(): flock -s 9
/init@259(): emergency_shell 'Can'''t mount root filesystem'
/lib/dracut-lib.sh@1094(emergency_shell): local _ctty
/lib/dracut-lib.sh@1095(emergency_shell): set +e
/lib/dracut-lib.sh@1096(emergency_shell): local _rdshell_name=dracut action=Boot hook=emergency
/lib/dracut-lib.sh@1097(emergency_shell): local _emergency_action
/lib/dracut-lib.sh@1099(emergency_shell): '[' 'Can'''t mount root filesystem' = -n ']'
/lib/dracut-lib.sh@1102(emergency_shell): '[' 'Can'''t mount root filesystem' = --shutdown ']'
/lib/dracut-lib.sh@1112(emergency_shell): echo
/lib/dracut-lib.sh@1112(emergency_shell): echo
/lib/dracut-lib.sh@1113(emergency_shell): warn 'Can'''t mount root filesystem'
/lib/dracut-lib.sh@66(warn): check_quiet
/lib/dracut-lib.sh@488(check_quiet): '[' -z yes ']'
/lib/dracut-lib.sh@67(warn): echo 'dracut Warning: Can'''t mount root filesystem'
/lib/dracut-lib.sh@68(warn): echo 'dracut Warning: Can'''t mount root filesystem'
dracut Warning: Can't mount root filesystem
/lib/dracut-lib.sh@1114(emergency_shell): echo
As mentioned above the same iso file boots fine when dd-ed into another usb drive, and the iso file in the target usb-drive is verified and has the correct checksum.
fredmyra
(1 rep)
Jan 22, 2023, 08:24 AM
• Last activity: Jan 29, 2023, 11:25 AM
0
votes
0
answers
649
views
GRUB2 - Booting ISO from USB-Drive gives ERROR - KDE neon, ArchLinux, Windows 10 - MuliBoot
I am trying to set up a multiboot ISO USB-Drive and I get error messages when I start the ISO file. As I see it, the loopback device is executed properly, otherwise no iso would start. However, the correct path cannot be found. I do not understand why. Maybe the loop device needs some more options o...
I am trying to set up a multiboot ISO USB-Drive and I get error messages when I start the ISO file.
As I see it, the loopback device is executed properly, otherwise no iso would start. However, the correct path cannot be found.
I do not understand why.
Maybe the loop device needs some more options or GUBB2 needs some modules.
1. The "KDE neon GNU/Linux (.iso)" boots without any problems.
2. The "Arch Linux (.iso)" gives the following error message:
> Booting a command list> error: no such module.
> Press any key to continue…
After pressing the Enter key the following happens
> Waiting for boot device ...> Waiting 30 seconds for device /dev/disk/by-label/ARCH_202211 ...
> ERROR: ’/dev/disk/by-label/ARCH_202211’ device didn't show up after 30 seconds...
> Falling back to interactive prompt.

3. The "Windows 10 (.iso)" does not find the file.
> Booting a command list> error:no such module.
> error: file '/efi/boot/bootx64.efi' not found
> Press any key to continue…
If I unpack the iso and copy it directly on the partition, windows boots without problems with this command (grub.cfg):
search.fs_uuid 2222-UUID-2222 root hd0,gpt1 set prefix=($root)'/grub' configfile $prefix/grub.cfg menuentry 'Windows 10' { chainloader (${root})/efi/boot/bootx64.efi }
My configuration
**USB-Drive:** fdisk -l /dev/sdb && lsblk -pf /dev/sdb Disk /dev/sdb: 7.48 GiB, 8021606400 bytes, 15667200 sectors Disk model: USB storage device Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 0000-UUID-0000 Device Start End Sectors Size Type /dev/sdb1 2048 206847 204800 100M EFI System /dev/sdb2 206848 15667166 15460319 7.4G Microsoft basic data NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT /dev/sdb ├─/dev/sdb1 vfat EFI 1111-UUID-1111 └─/dev/sdb2 ntfs BOOT 2222-UUID-2222 I installed the USB-Drive as described in the GNU GRUB manual grub-install --efi-directory=/mnt/EFI --boot-directory=/mnt/BOOT --removable **grub.cfg:** search.fs_uuid 2222-UUID-2222 root hd0,gpt2 set prefix=($root)'/grub' configfile $prefix/grub.cfg menuentry "KDE neon GNU/Linux ISO" { rmmod tpm set isofile="/KDEneon.iso" loopback loop (${root})/$isofile linux (loop)/casper/vmlinuz boot=casper apparmor=0 iso-scan/filename=$isofile noprompt noeject lang=en locale=de_DE.UTF-8 initrd (loop)/casper/initrd } menuentry "Arch Linux ISO" { rmmod tpm set isofile="/ArchLinux.iso" loopback loop (${root})/$isofile search --no-floppy --set=root --label ARCH_202211 linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211 iso-scan/filename=$isofile noprompt noeject lang=en locale=de_DE.UTF-8 initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (${root})/arch/boot/x86_64/initramfs-linux.img } menuentry 'Windows 10 ISO' { rmmod tpm set isofile="/Windows10.iso" loopback loop (${root})/$isofile chainloader (loop)/efi/boot/bootx64.efi iso-scan/filename=$isofile noprompt noeject } menuentry 'Windows 10 Extracted' { chainloader (${root})/efi/boot/bootx64.efi } #menuentry 'memtest' { # #} menuentry 'UEFI Settings' --class uefi { fwsetup } menuentry "Restart" --class reboot { reboot } menuentry "Power Off" --class halt { halt } **--- EDIT ---** I installed the ArchLinux.iso with DD on the USB drive and this is what the drive looks like. sudo dd if=/home/anonymus/Downloads/ArchLinux.iso of=/dev/sdb status=progress > fdisk -l /dev/sdb && lsblk -pf /dev/sdb && cat Disk /dev/sdb: 7.48 GiB, 8021606400 bytes, 15667200 sectors Disk model: USB storage device Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0000-UUID-0000 Device Boot Start End Sectors Size Id Type /dev/sdb1 * 64 1570815 1570752 767M 0 Empty /dev/sdb2 1570816 1601535 30720 15M ef EFI (FAT-12/16/32) NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT /dev/sdb iso9660 ARCH_202211 2022-11-01-13-53-46-00 ├─/dev/sdb1 iso9660 ARCH_202211 2022-11-01-13-53-46-00 0 100% /mnt/ARCH_202211 └─/dev/sdb2 vfat ARCHISO_EFI 55DC-6BC5 > Arch Linux grub.cfg # Load partition table and file system modules insmod part_gpt insmod part_msdos insmod fat insmod iso9660 # Use graphics-mode output insmod all_video insmod font if loadfont "${prefix}/fonts/unicode.pf2" ; then insmod gfxterm set gfxmode="auto" terminal_input console terminal_output gfxterm fi # Enable serial console if serial --unit=0 --speed=115200; then terminal_input --append serial terminal_output --append serial fi # Set default menu entry default=archlinux timeout=15 timeout_style=menu # GRUB init tune for accessibility play 600 988 1 1319 4 # Menu entries menuentry "Arch Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { set gfxpayload=keep search --no-floppy --set=root --label ARCH_202211 linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211 initrd /arch/boot/intel-ucode.img /arch/boot/amd-ucode.img /arch/boot/x86_64/initramfs-linux.img } menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { set gfxpayload=keep search --no-floppy --set=root --label ARCH_202211 linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211 accessibility=on initrd /arch/boot/intel-ucode.img /arch/boot/amd-ucode.img /arch/boot/x86_64/initramfs-linux.img } if [ "${grub_platform}" == "efi" ]; then if [ "${grub_cpu}" == "x86_64" ]; then menuentry "UEFI Shell" { insmod chain search --no-floppy --set=root --label ARCH_202211 chainloader /shellx64.efi } elif [ "${grub_cpu}" == "i386" ]; then menuentry "UEFI Shell" { insmod chain search --no-floppy --set=root --label ARCH_202211 chainloader /shellia32.efi } fi menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' { fwsetup } fi menuentry "System shutdown" --class shutdown --class poweroff { echo "System shutting down..." halt } menuentry "System restart" --class reboot --class restart { echo "System rebooting..." reboot }
Teso
(145 rep)
Nov 16, 2022, 08:00 PM
• Last activity: Nov 18, 2022, 10:04 PM
0
votes
1
answers
768
views
Windows partition not seen
I have a pc which was running Windows 10 and I wanted to create another partition and dual boot Pop-OS. I followed instructions to create a bootable USB drive and use Gparted to make a new partition. Installed Pop-OS and everything seemed good. Linux now running on my machine. However, I noticed tha...
I have a pc which was running Windows 10 and I wanted to create another partition and dual boot Pop-OS. I followed instructions to create a bootable USB drive and use Gparted to make a new partition. Installed Pop-OS and everything seemed good. Linux now running on my machine. However, I noticed that there was no option after POST to select which os I wanted to run. I found a command (11 year old post) to hold SHIFT down while booting and it showed me the blue Grub screen with operating systems on it and only the Pop GNU/Linux option was listed. Another post (dated 2018) suggested running 'gnome-disks' to see what is there and it showed the two partitions for Windows and the two for Linux. Only the Linux was mounted, so I mounted all of them and rebooted, but to no avail. I ran 'ntfsfix /dev/sda2' where sda2 is my ntfs partition for Windows, and got this error: 'Refusing to operate on read-write mounted device /dev/sda2.' I am still learning the system, but have learned so much already because of this problem.
I need some help please.
mshearne
(1 rep)
May 18, 2022, 06:13 PM
• Last activity: May 18, 2022, 06:36 PM
1
votes
0
answers
195
views
Adding a working boot option to get to my pacstrap/chroot install on a luks partition
I know there are are a lot of questions like this but the examples I have found differ enough to confuse me, I'm hoping someone can help clarify this for me. To briefly explain my setup. I have a windows 10 install and then on a different disk I have a garuda linux install. Both work fine but were s...
I know there are are a lot of questions like this but the examples I have found differ enough to confuse me, I'm hoping someone can help clarify this for me.
To briefly explain my setup. I have a windows 10 install and then on a different disk I have a garuda linux install. Both work fine but were set up for me by a the respective gui installers. I have now installed arch linux to separate partition (luks encrypted) from my garuda install (pacstrap) and would like to be able to boot into it. I can chroot into the install and have done bind mount for /dev /proc and /sys so I can see all devices and have successfully run an update and installed some bins.
disk/partition setup is as follows:
Windows disk and EFI:
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1085439 1083392 529M Windows recovery environment
/dev/nvme0n1p2 1085440 1290239 204800 100M EFI System
/dev/nvme0n1p3 1290240 1323007 32768 16M Microsoft reserved
/dev/nvme0n1p4 1323008 519925759 518602752 247.3G Microsoft basic data
/dev/nvme0n1p5 519925760 1953523711 1433597952 683.6G Microsoft basic data
and then for linux:
/dev/sda1 2048 835028991 835026944 398.2G Linux filesystem (garuda)
/dev/sda2 835028992 1859028991 1024000000 488.3G Linux filesystem (arch -no boot)
sda1 & sda2 are both on btrfs partitions with luks encryption. However, I am not entirely clear how the garuda one was set up (gui installer). I am currently logged into garuda and have both drives unencrypted however I only see the dev/mapper for the device Im not booted into (dev/sda2) and that is the only one that show up with a luks map in lsblk:
✦ ╰─λ lsblk -o name,uuid,type
NAME UUID TYPE
sda disk
├─sda1 c42114f3-adea-4625-8ec7-1d9ef08c00d5 part
├─sda2 35308676-366b-495a-afd3-9c65701ec867 part
│ └─luks-35308676-366b-495a-afd3-9c65701ec867 fb72ec72-1352-4e5c-849d-a44c69ba4b16 crypt
The unencrypted device is mounted to /run/media/dan/nix_e1
with the arch install visible.
/boot
(garuda ) I have grub dir, kernels and the efi partition mounted to /efi :
✦ ╰─λ ls /boot
drwxr-xr-x - root 1 Jan 1970 efi
drwxr-xr-x - root 29 Mar 02:28 grub
drwxr-xr-x - root 8 Mar 05:09 memtest86+
.rw-r--r-- 51k root 11 Mar 19:21 amd-ucode.img
.rw------- 68M root 26 Mar 16:27 initramfs-linux-zen-fallback.img
.rw------- 43M root 26 Mar 16:27 initramfs-linux-zen.img
.rw-r--r-- 11M root 23 Mar 16:37 vmlinuz-linux-zen
/etc/fstab (garuda):
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 / btrfs subvol=/@,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /home btrfs subvol=/@home,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /root btrfs subvol=/@root,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /srv btrfs subvol=/@srv,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /var/cache btrfs subvol=/@cache,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /var/log btrfs subvol=/@log,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=c42114f3-adea-4625-8ec7-1d9ef08c00d5 /var/tmp btrfs subvol=/@tmp,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=C61E-FDE5 /boot/efi vfat defaults 0 1
I haven't mounted anything to /boot on the arch install yet, so it just has copies of the same kernels as garuda (also arch based) and I have created the efi directory ready for the mount. I have setup the fstab (though Im not entirely sure if I have used the correct uuid - will it see it with the crypt uuid or the part uuid?)
/etc/fstab (arch):
#
# /dev/mapper/luks-35308676-366b-495a-afd3-9c65701ec867 LABEL=nix_e1
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 / btrfs rw,nosuid,nodev,relatime,ssd,space_cache=v2,subvolid=5,subvol=/ 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /home btrfs subvol=/@home,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /root btrfs subvol=/@root,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /srv btrfs subvol=/@srv,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /var/cache btrfs subvol=/@cache,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /var/log btrfs subvol=/@log,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=fb72ec72-1352-4e5c-849d-a44c69ba4b16 /var/tmp btrfs subvol=/@tmp,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
# /dev/zram0
/dev/zram0 none swap defaults,pri=100 0 0
Now this is the point where I get a little lost:
From reading I understand I need an initcpio hook, now I am guessing this is already in place for my garuda install. I can see grub-btrfs-overlayfs has been added to the hooks and it seems to have the crypt hook is part of the install... I'm assuming I dont need to do this on the arch partition as well unless I want to update grub from there too (saw some advice not to update grub from two installs).
I think next I need to run sudo mkinitcpio -p linux-zen
(not sure if I have missed some configuration step). However I have added this device to /etc/crypttab
and now it gets auto-mounted and unlocked when I enter the password once (which is the same for both partitions) - so at login to garuda both drives are unlocked... I think this suggests it is set up correctly.
Now some seem to suggest that a grub update should pick up the install at this point but it doesn't add a menu entry on update
So I have added a menu entry manually to grub:
/etc/grub.d/40_custom
:
menuentry "Arch" {
search --set=root --fs-uuid luks-35308676-366b-495a-afd3-9c65701ec867
linux /boot/vmlinuz-linux-zen root=UUID=35308676-366b-495a-afd3-9c65701ec867 rw quiet
}
Now I get an entry in my grub boot menu but on booting it says device 35308676-366b-495a-afd3-9c65701ec867 cannot be found, I have also tried with the uuid fb72ec72-1352-4e5c-849d-a44c69ba4b16 and got the same error.
I would appreciate if somebody could confirm what I have done so far is correct and point me in the right direction to get this working.
Thank you in advance.
SwiftD
(191 rep)
Mar 29, 2022, 08:26 PM
• Last activity: Mar 30, 2022, 09:57 PM
18
votes
1
answers
72441
views
Timed out waiting for device dev-disk-by\x2duuid-C829\x2dC4C1.device
I had formatted efi partition and installed windows again. I have dual boot Windows and Linux, then I installed the grub bootloader again from a live usb using these commands: mount /dev/sda* /mnt mount --bind /dev /mnt/dev mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys mount /dev/sda* /mnt...
I had formatted efi partition and installed windows again. I have dual boot Windows and Linux, then I installed the grub bootloader again from a live usb using these commands:
mount /dev/sda* /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount /dev/sda* /mnt/boot/efi
mount /mnt/hostrun
mount --bind /run /mnt/hostrun
chroot /mnt
grub-install /dev/sda
update-grub
exit
Then I unmounted all of this again. When I tried to boot, I got this messages:
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-C829\x2dC4C1.device.
[DEPEND] Dependency failed for file system check on /dev/disk/by-uuid/C829-C4C1.
[DEPEND] Dependency failed for /boot/efi.
[DEPEND] Dependency failed for Local File System.
and it turns me into emergency mode. How can I solve this problem?
Mido Ahmed
(183 rep)
Sep 27, 2018, 01:28 AM
• Last activity: Sep 14, 2021, 07:03 PM
Showing page 1 of 20 total questions