You are not logged in.
Heya!
So today I wanted to shrink my sda1 partition to create space for some swap. I did that using cfdisk, and removed 21GB (exact data about my system in a bit). I then set it up by using mkswap, swapon and regenerated my fstab.
After a reboot, I ran into this problem, where now when I boot my PC up, I only get this message
error: unknown filesystem.
Entering rescue mode...
grub rescue>I started up my arch linux live ISO, and tried to mount /dev/sda1 to /mnt, giving me yet again an error with unknown filesystem.
I figured out that I hadn't resized the table of the partition!
Afterwards I tried to use resize2fs and e2fsck, with no success. I gave up and used cfdisk to revert my changes, removing the new partition and appending it to sda1.
After a reboot, I was able to mount /dev/sda1 and everything looked normal. I was able to arch-chroot and everything was still there as before.
I once again regenerated my fstab and reinstalled linux via pacman to let it regenerate stuff that might have been changed.
Yet, now I still have the grub rescue screen whenever I boot. I dont even use grub, I use limine. I reinstalled limine using my live ISO, but still the same error.
What can I do? My filesystem is working, and df in the live ISO told me its ext4!
About my PC:
Partitions:
- sda1 / ext4 421GB
- sda2 /home ext4 500GB
- sda3 /boot FAT32 Its all on one SSD.
The size I took off sda1 was 21GB, because it looked convenient.
Thanks a lot!!
Last edited by LabRicecat (2023-11-19 19:43:31)
Offline
Hi,
before shrinking the partition, you must shrink the ext4 filesystem, then afterwards the partition.
Make a backup before.
If this sound too risky, I recommend to use a swapfile instead of a swap partition:
Offline
I now properly added 21GB of swap using firstly resize2fs and cfdisk, but even then grub rescue complains about unknown filesystems, the life ISO tells me everything is fine..
What I did on the live system:
# e2fsck -f /dev/sda1
# resize2fs /dev/sda1 400G
# cfdisk
# mount /dev/sda1 /mnt
# mount /dev/sda2 /mnt/home
# mount /dev/sda3 /mnt/boot
# mkswap /dev/sda4
# swapon /dev/sda4
# genfstab -U /mnt > /mnt/etc/fstab
# rebootLast edited by LabRicecat (2023-11-18 12:42:17)
Offline
I dont understand at all, why the grub rescue starts, I dont have grub installed.
I ran find -name "*grub*" and not a single file was found, this is weird..
Now also redid the installation process of /boot described in the installation guide, still the same grub rescue message. :c
Last edited by LabRicecat (2023-11-18 13:23:04)
Offline
I now _also_ uninstalled limine and installed grub, thinking maybe I had a broken grub installation somehow, but no, that also does not do anything and still causes the same message as shown above.
Offline
Okay I now can only guess that my PC must be haunted, I reinstalled my /dev/sda1 (root) and /dev/sda3 (boot) from scratch, and I still get this message.
Maybe it has something to do with the UEFI?
Offline
"maybe UEFI" troubles me - this is a major difference and must be considered for grub.
Did you follow https://wiki.archlinux.org/title/GRUB ?
Then you must come at the point, were you have either a UEFI system, or a BIOS system...
I have to ask, did you use https://wiki.archlinux.org/title/Installation_guide at all ? There is the step "Verify the boot mode" ...
Offline
I said before I use limine, not grub.
And yes I used the installation guide, and yes I read it carefully.
I also followed the UEFI guide for limine on the arch wiki, not the BIOS one.
Last edited by LabRicecat (2023-11-18 17:56:24)
Offline
I think we are at grub now ?
I now _also_ uninstalled limine and installed grub
/boot == sda3 is also your EFI system partition ?
Offline
Sorry I should have clarified, I switched back to limine after grub was not working.
For testing, someone who uses grub helped me install it _again_, but still the same result. (I am now at grub)
Also yes, sda3 is my EFI partition I marked as bootable.
Offline
(I am now at grub)
ok, going with grub and UEFI mode:
please follow the steps here https://wiki.archlinux.org/title/GRUB#UEFI_systems, and post all used commands and output here.
Please report anything strange or come back if a step us unclear for you.
Afterwards show the partition and file-system layout, the content of /boot and output of efibootmgr.
Sanity check: Bios is set to to an UEFI boot entry "GRUB", not a BIOS disk ?
Offline
Sorry for the late response.
I now wiped my whole SSD, and installed everything from scratch following closely the arch installation guide.
Yet again, even after all that, the same message persists.
Update on everything now, I am sorry about the many changes.
Current bootloader: limine
Config: the one from the arch limine guide, but with my root partition UUID set.
Paritions:
/dev/sda1: fat32 : 500MiB : /boot ( set as bootable with cfdisk )
/dev/sda2 : swap : 21G
/dev/sda3 : ext4 : 400GB : /
/dev/sda4 : ext4 : 500GB : /homeTo whipe I did
# cat /dev/zero > /dev/sdaX
# mkfs.ext4 /dev/sda3
# mkfs.ext3 /dev/sda4
# swapon /dev/sda2
# mkfs.fat -F 32 /dev/sda1
# cfdisk #<- set /dev/sda1 as bootableBut the lines
error: unknown filesystem.
Entering rescue mode...
grub rescue>still occurs upon boot. I rebooted and did a complete poweroff...
I am running out of ideas. I swear I only did what the arch install guide told me.
Any ideas what might have caused this and how I can fix it?
Thanks!
Offline
I now wiped my whole SSD
...
# cat /dev/zero > /dev/sdaX
No, that wipes only the partition X, not the whole disk, whole disk would be /dev/sda without X.
If you had unintentionally made the grub steps for "BIOS system" then grub resides in the 1st blocks on the disk, and these may exists there still and are used when you set your Bios boot order wrong:
That's why I was asking for:
Sanity check: Bios is set to to an UEFI boot entry "GRUB", not a BIOS disk ?
Edit: also look out for "CSM Support" in that bios section
Last edited by ua4000 (2023-11-19 15:36:15)
Offline
Sorry with the X i meant I ran it on all the partitions.
I dont understand what you mean by that question, I'm sorry. Can you explain it a little simpler?
When I was installing grub, I did the 3 steps in 2.1 Installation and ran
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUBif thats what you mean. I am quite sure I did not do the BIOS installation for grub, as I did not scroll that far down.
Last edited by LabRicecat (2023-11-19 15:41:29)
Offline
Sorry with the X i meant I ran it on all the partitions.
Again: cycling with X through all partitions will probably not erase the entire disk, and may skip the grub bootloader code in the mbr, the 1st block.
Let's have a look at the mbr, if it contains grub
sudo file -s /dev/sda
sudo head -c 512 /dev/sda | stringsOffline
Oh!
# file -s /dev/sda
DOS/MBR boot sector
# head -c 512 /dev/sda | strings
ZRr=
`|f
\|f1
GRUB
Geom
Hard Disk
Read
ErrorYour theory seems to be correct, but what now?
Last edited by LabRicecat (2023-11-19 17:06:30)
Offline
To add context, this is the output of fdisk
# fdisk -l /dev/sda
Disk /dev/sda: 931.52 GiB, 1000207286272 bytes, 1953529856 sectors
Disk model: WDC WDS100T2G0A-
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: 0x9def3ced
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux
/dev/sda2 1026048 45066239 44040192 21G 83 Linux
/dev/sda3 45066240 883927039 838860800 400G 83 Linux
/dev/sda4 883927040 1953529855 1069602816 510G 83 LinuxLast edited by LabRicecat (2023-11-19 17:22:20)
Offline
Disklabel type: dos
This suggests, you are using "3.1 BIOS system" and not "3.2 UEFI system" from https://wiki.archlinux.org/title/Limine ?
And if you follow the "BIOS system" steps, there is
# limine bios-install /dev/sdXwhich surly replaces grub by Limine.
(Note: the X stands only for a letter - not the partition number)
Or did you follow chapter "3.2 UEFI systems" ?
Please post a
efibootmgr -uv
sudo cat /sys/firmware/efi/fw_platform_sizeOffline
A friend of mine suggested to simply redo the installation, but beforehand clear the MBR by running
# cat /dev/zero > /dev/sdaNow I did that, reinstalled using the guide and got, finally, a different error!
Reboot and Select proper Booz device
or Insert Boot Media in selected Boot device and press a keyIn my BIOS I see my SSD as boot option and selected it.
Some information:
# cat /sys/firmware/efi/fw_platform_size
64
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.9.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953529856 sectors, 931.5 GiB
Model: WDC WDS100T2G0A-
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 466E899B-46D2-4D16-BEF6-24662D253761
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 2048, last usable sector is 1953529822
Partitions will be aligned on 2048-sector boundaries
Total free space is 2015 sectors (1007.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1026047 500.0 MiB EF00
2 1026048 45066239 21.0 GiB 8200
3 45066240 883927039 400.0 GiB 8300
4 883927040 1953527807 510.0 GiB 8300
# file -s /dev/sda
/dev/sda: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 1953529855 sectors, extended partition table (last)
# efibootmgr -uv
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001
Boot0001* Festplatte BBS(HD,,0x0)䵁佇䵁低¯
Boot0002* UEFI: KingstonDataTraveler 3.0 PciRoot(0x0)/Pci(0x1a,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0xfd38acc6,0x18c000,0x7800)䵁佂(Boot0002 is my live USB)
Offline
efibootmgr shows, that you did not added Limine.
The step is mentioned in the Limine wiki, but you may have overlooked it, because it's maybe not clear enough this step is mandatory. (I will have a look to make it better)
You need to add a boot option for Limine:
https://wiki.archlinux.org/title/Unifie … efibootmgr
Give it nice name, e.g. "limine", then you should find this name next time in Bios to select as boot device.
Run
# efibootmgr -uvafter adding the Limine entry - "limine" should be listed there.
Offline
Running the said efibootmgr command yields the following error:
# efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/BOOT/BOOTX64.EFI --label "limine" --unicode
EFI variables are not supported on this system.I was unsure and ran it both on the mounted sda1 (with everything mounted) and in the live ISO.
What do I do?
Edit: I have the suspicion previously trying to boot the SSD, failing and then booting the live USB caused a problem, let me see if thats it..
Edit2: Yes! That was it. I was able to set it.
# efibootmgr -uv
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0002,0001
Boot0000* limine HD(1,GPT,9d4d6ace-2980-4f61-8ba9-d756ad6cc015,0x800,0xfa000)/File(\EFI\BOOT\BOOTX64.EFI)
dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 a0 0f 00 00 00 00 00 ce 6a 4d 9d 80 29 61 4f 8b a9 d7 56 ad 6c c0 15 02 02 / 04 04 30 00 5c 00 45 00 46 00 49 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
Boot0001* Festplatte BBS(HD,,0x0)䵁佇䵁低¯
dp: 05 01 09 00 02 00 00 00 00 / 7f ff 04 00
data: 41 4d 47 4f 41 4d 4e 4f af 00 00 00 01 00 00 00 6f 00 57 00 44 00 43 00 20 00 57 00 44 00 53 00 31 00 30 00 30 00 54 00 32 00 47 00 30 00 41 00 2d 00 30 00 30 00 4a 00 48 00 33 00 30 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 02 1f 03 12 0a 00 01 00 ff ff 00 00 7f ff 04 00 01 04 3e 00 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 30 00 32 00 36 00 34 00 4e 00 36 00 35 00 34 00 38 00 35 00 39 00 30 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00 00 00 7f ff 04 00 41 4d 42 4f 41 4d 4e 4f bd 00 00 00 01 00 00 00 79 00 4b 00 69 00 6e 00 67 00 73 00 74 00 6f 00 6e 00 44 00 61 00 74 00 61 00 54 00 72 00 61 00 76 00 65 00 6c 00 65 00 72 00 20 00 33 00 2e 00 30 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 00 1a 03 05 06 00 01 00 03 05 06 00 02 00 7f ff 04 00 01 04 46 00 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 4b 00 69 00 6e 00 67 00 73 00 74 00 6f 00 6e 00 44 00 61 00 74 00 61 00 54 00 72 00 61 00 76 00 65 00 6c 00 65 00 72 00 20 00 33 00 2e 00 30 00 00 00 7f ff 04 00 41 4d 42 4f
Boot0002* UEFI: KingstonDataTraveler 3.0 PciRoot(0x0)/Pci(0x1a,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0xfd38acc6,0x18c000,0x7800)䵁佂
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 1a / 03 05 06 00 01 00 / 03 05 06 00 02 00 / 04 01 2a 00 01 00 00 00 00 c0 18 00 00 00 00 00 00 78 00 00 00 00 00 00 c6 ac 38 fd 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
data: 41 4d 42 4fLast edited by LabRicecat (2023-11-19 19:40:06)
Offline
in your previous output your have booted in UEFI mode:
# cat /sys/firmware/efi/fw_platform_size
64
You need to do this again. Post this "cat" again and the output of invoking efibootmgr.
Last edited by ua4000 (2023-11-19 19:41:07)
Offline
I was finally able to boot into my system!!
Many thanks ua4000, I will mark this thread finally as solved now.
My week is saved!
Offline