Skip to main content
Expect a delay in my reactions
Source Link

Edit: As I'm using the USB stick right now, I can't test any propositions right away. I'll do my best to try them within 24 hours.


Edit: As I'm using the USB stick right now, I can't test any propositions right away. I'll do my best to try them within 24 hours.

Source Link

Why does the OS boot from ext4 on a particular PC only?

I've installed Manjaro on a USB stick to carry with me. However, I can boot from it only on the machine I used to install. On other PCs, the BIOS or UEFI does not recognize the drive as bootable.

The device /dev/sda has a single partition /dev/sda1 formatted as ext4. There is a /boot/ directory there, with /boot/initramfs-6.5-x86_64.img and other files there. The partition has the boot flag.


$ mount displays the following:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8158880k,nr_inodes=2039720,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda1 on / type ext4 (rw,noatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14490)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=8175772k,nr_inodes=1048576,inode64)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1635152k,nr_inodes=408788,mode=700,uid=1000,gid=1001,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1001)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1001)

$ df -Th shows

Filesystem     Type      Size  Used Avail Use% Mounted on
dev            devtmpfs  7.8G     0  7.8G   0% /dev
run            tmpfs     7.8G  1.5M  7.8G   1% /run
/dev/sda1      ext4      458G  103G  332G  24% /
tmpfs          tmpfs     7.8G     0  7.8G   0% /dev/shm
tmpfs          tmpfs     7.8G   96K  7.8G   1% /tmp
tmpfs          tmpfs     1.6G  132K  1.6G   1% /run/user/1000

# blkid (with elevated privileges) returns

/dev/sda1: UUID="419d4f22-7fd6-42ea-a273-4e54028197ce" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b1e4001d-01"

# fdisk -l /dev/sda reports

Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: SSD 870 EVO 500G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0xb1e4001d

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1  *     2048 976773119 976771072 465.8G 83 Linux

Finally, if it's even relevant, # gdisk -l /dev/sda writes

GPT fdisk (gdisk) version 1.0.9.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk /dev/sda: 976773168 sectors, 465.8 GiB
Model: SSD 870 EVO 500G
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): DC55B4BD-D878-4752-9414-E4CE82C33258
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048       976773119   465.8 GiB   8300  Linux filesystem

Now, how do I make the USB stick more portable? Does it worth converting MBR to GPT, as described here? I'd prefer not to re-install the OS.