Curtin seems to have mangled my /etc/fstab, partition table and filesystems

Ubuntu Version

Ubuntu 26.04 LTS

Desktop Environment (if applicable)

Other

Problem Description

Today, I performed an update/upgrade on my aarch64 laptop running 26.04.1 w/ 7.2.0-18-qcom-x1e. My guix-daemon.service would not start. Some digging indicated that my required /gnu partition was no longer the same. It seems to me a program called curtin came and modified my /etc/fstab (it was modified today, apparently by the update). My stuff seems to be gone.

Anyone have an idea of what happened here?

Here is the modified /etc/fstab file. Note the comments from curtin:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p17 during curtin installation
/dev/disk/by-uuid/c4d3cef4-35f7-4994-8078-9e2bdd22eee7 / ext4 defaults 0 1
# /boot/efi was on /dev/nvme0n1p12 during curtin installation
/dev/disk/by-uuid/7CE3-1FD4 /boot/efi vfat defaults 0 1
/swap.img	none	swap	sw	0	0
#
/dev/nvme0n1p14 /mnt/c  ntfs-3g ro,noauto 0 0 
/dev/nvme0n1p18 /gnu    ext4    defaults  0 0
/dev/keep/opt   /opt    ext4    defaults  0 2
/dev/keep/home  /home   ext4    defaults  0 2

Relevant System Information

gdisk -l /dev/nvme0n1 gives

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            4095   1024.0 KiB  FFFF  ToolsFv
   2            4096           36863   16.0 MiB    FFFF  LogFs
   3           36864           38911   1024.0 KiB  FFFF  EnterpriseFV
   4           38912           40959   1024.0 KiB  FFFF  ToolsFv_BACKUP
   5           40960          184319   70.0 MiB    FFFF  UpdateCapsule
   6          184320          430079   120.0 MiB   FFFF  NHLOS
   7          430080          675839   120.0 MiB   FFFF  core_nhlos_a
   8          675840          677887   1024.0 KiB  FFFF  quantumsdk
   9          677888          679935   1024.0 KiB  FFFF  quantumfv
  10          679936          681983   1024.0 KiB  FFFF  catecontentfv
  11          681984         1730559   512.0 MiB   FFFF  logdump
  12         1730560         2263039   260.0 MiB   EF00  EFI system partition
  13         2263040         2295807   16.0 MiB    0C01  Microsoft reserved ...
  14         2295808       428091391   203.0 GiB   0700  Basic data partition
  15       428091392       430471167   1.1 GiB     2700  
  16       430471168       732461055   144.0 GiB   8300  
  17       732461056      1845633023   530.8 GiB   8300  
  18      1845633024      1997705215   72.5 GiB    8300  
  19      1999876096      2000408575   260.0 MiB   2700  Basic data partition

lsblk -o NAME,UUID,PARTUUID gives

NAME          UUID                                   PARTUUID
nvme0n1                                              
├─nvme0n1p1                                          7a5ca853-310b-479d-8516-0449dabde649
├─nvme0n1p2                                          5cae5047-ca58-48f0-91d0-92bfface8ad2
├─nvme0n1p3                                          a7a2337b-9be5-4c4b-8f71-099f77f921d8
├─nvme0n1p4                                          e35479c4-a95a-481e-9df1-537af1417b93
├─nvme0n1p5                                          83828a04-4b98-4643-9e2c-18cd3e213a0e
├─nvme0n1p6                                          238a2d69-e5d8-42bb-b1cb-f7a0c2270da1
├─nvme0n1p7                                          177e556f-7e66-48fd-9244-bc1841c2d4b2
├─nvme0n1p8                                          1aa91dc2-8126-4b66-bd72-b7277ea17025
├─nvme0n1p9                                          fbe65804-cb6e-4ab8-b164-edeead5b0d76
├─nvme0n1p10                                         ca97514a-59d2-4a15-8377-714742a8ef45
├─nvme0n1p11                                         410728dd-3c0f-496d-86e0-700af7fee6db
├─nvme0n1p12  7CE3-1FD4                              6d65694a-c489-41c3-acb9-2e9318d18c2b
├─nvme0n1p13                                         a9bdfb15-2955-4fde-a5ab-954c25e25adb
├─nvme0n1p14  54B8E4D2B8E4B3A0                       810d26be-3f95-481c-96b7-43a596a04d70
├─nvme0n1p15  7282F40382F3CA1D                       43b41c90-c8af-498a-b61e-e9edbd62e8a3
├─nvme0n1p16  4b882a56-3884-4df0-ab6b-f1bd6898180b   7e5eaf92-4925-4d50-9ab5-538d7b38bd64
├─nvme0n1p17  BWBIzB-8mrn-NaQ3-4DMh-JT9N-JwgI-sHkbMV 77481dc8-52f6-4132-9b49-66ec2d439209
│ ├─keep-opt  08e001bc-5e83-48b2-b9bc-c80c8caa1500   
│ └─keep-home 0f314fd3-5d5e-428c-9f4c-0d181dac9b93   
├─nvme0n1p18  c4d3cef4-35f7-4994-8078-9e2bdd22eee7   d65e3e13-11ba-4528-8da4-ea329013f373
└─nvme0n1p19  9CDF-DA8D                              73c24026-728d-4ed4-a557-31dbcc76ac08
1 Like

Curtin is the backend of the installer that you used to make your initial installation, normally it only runs from the live media and never again afterwards.

Part of this process is to create the initial fstab from scratch and in that process it writes these comments, it is very unlikely you or any tool have run curtin on the installed system (and I doubt you have it installed, check that…)

1 Like

It is absolutely unclear what does it mean. Your /etc/fstab contains the line for /gnu mount point. Is it no more mounted? Then show the errors during mount. Is it mounted using a different partition? Then show the actual state when it is mounted. The partition is correct and is also mounted but the content of it is not what you expected?

Look at lsblk output: nvme0n1p18 has UUID c4d3cef4-..., which is your root partition /. Because you added /dev/nvme0n1p18 /gnu to fstab, you are mounting root over /gnu.

Your Guix store is intact on nvme0n1p16 (144 GiB).

Mount it to check:
sudo mount /dev/disk/by-uuid/4b882a56-3884-4df0-ab6b-f1bd6898180b /gnu

Then update /etc/fstab to use that UUID instead of the device name.

1 Like

I’d suggest using UUIDs for all permanent/internal filesystems

1 Like

Indeed, you spotted it @steelf. Thanks very much!

I believe now the culprit was a MS Windows update. I think it mucked with the partition table.

I will use UUIDs in the future. I didn’t know how before. (I was more active on Unix in the 80’s and 90’s).

When I got this machine, I used Windows to reduce the size of the window data partition and then created more partitions for ubuntu. Here are my notes from many months ago.

Device               Start        End   Sectors   Size Type
/dev/nvme0n1p1        2048       4095      2048     1M unknown
/dev/nvme0n1p2        4096      36863     32768    16M unknown
/dev/nvme0n1p3       36864      38911      2048     1M unknown
/dev/nvme0n1p4       38912      40959      2048     1M unknown
/dev/nvme0n1p5       40960     184319    143360    70M unknown
/dev/nvme0n1p6      184320     430079    245760   120M unknown
/dev/nvme0n1p7      430080     675839    245760   120M unknown
/dev/nvme0n1p8      675840     677887      2048     1M unknown
/dev/nvme0n1p9      677888     679935      2048     1M unknown
/dev/nvme0n1p10     679936     681983      2048     1M unknown
/dev/nvme0n1p11     681984    1730559   1048576   512M unknown
/dev/nvme0n1p12    1730560    2263039    532480   260M EFI System
/dev/nvme0n1p13    2263040    2295807     32768    16M Microsoft reserved
/dev/nvme0n1p14    2295808  430471167 428175360 204.2G Microsoft basic data
UNUSED		 430471168 1997705215 1567234048 783GB = 765GiB
/dev/nvme0n1p15 1997705216 1999876095   2170880     1G Windows recovery environment
/dev/nvme0n1p16 1999876096 2000408575    532480   260M Windows recovery environment
/dev/nvme0n1p17 1845633024 1997705215 152072192  72.5G Linux filesystem

Partition table entries are not in disk order.

todo
  p18               430471168 732461055 301989888 150G   /gnu
  p19               732461056 1845633023 1113171968 570G vg
2 Likes

Back in the 80s when you were active on Unix, I was mostly active in a sandbox with worms and a plastic shovel :grinning_face:

Glad your data is safe! :wink:

2 Likes

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.