Introduction
During boot, the initramfs (initial RAM filesystem) is responsible for loading necessary drivers and mounting the root filesystem. When it cannot locate the root device, it drops to a busybox shell with an error like ALERT! /dev/disk/by-uuid/xxx does not exist. Dropping to a shell! This leaves the system in a non-bootable state that requires manual intervention or boot media recovery.
Symptoms
- Boot stops at
(initramfs)busybox prompt - Error message:
Gave up waiting for root file system device ALERT! /dev/disk/by-uuid/xxxxx does not existWaiting for root device /dev/sda1...followed by timeout- System works with one kernel but drops to initramfs with another
Common Causes
- Root device UUID changed after repartitioning or filesystem recreation
- Storage controller driver not included in initramfs (common with new NVMe or RAID controllers)
- USB boot drive not ready when root= parameter is evaluated (timing issue)
- Device name changed from
/dev/sda1to/dev/vda1after VM migration - LVM volume group not activated during initramfs phase
Step-by-Step Fix
- 1.From the initramfs busybox prompt, enumerate available devices:
- 2.```bash
- 3.# List all block devices
- 4.ls /dev/sd* /dev/vd* /dev/nvme* /dev/mapper/* 2>/dev/null
# Check UUIDs of available devices blkid
# List available partitions cat /proc/partitions ```
- 1.Try to manually mount the root filesystem:
- 2.```bash
- 3.# Try mounting each potential root device
- 4.mount /dev/sda2 /root 2>/dev/null
- 5.mount /dev/sda1 /root 2>/dev/null
- 6.mount /dev/vda2 /root 2>/dev/null
- 7.mount /dev/nvme0n1p2 /root 2>/dev/null
# If mounted successfully, exit to continue booting exit ```
- 1.If using LVM, activate volume groups manually:
- 2.```bash
- 3.lvm vgscan
- 4.lvm vgchange -ay
- 5.lvm lvs
- 6.# Then mount the logical volume
- 7.mount /dev/mapper/vg0-root /root
- 8.exit
- 9.
` - 10.After successful boot, fix the boot configuration:
- 11.```bash
- 12.# Find the correct UUID
- 13.sudo blkid
- 14.# Update GRUB with correct root= parameter
- 15.sudo nano /etc/default/grub
- 16.# Ensure GRUB_CMDLINE_LINUX contains the correct root=UUID=
- 17.sudo update-grub
- 18.
` - 19.Regenerate initramfs with all necessary drivers:
- 20.```bash
- 21.# Ensure the storage driver module is listed
- 22.echo "nvme" | sudo tee -a /etc/initramfs-tools/modules
- 23.echo "ahci" | sudo tee -a /etc/initramfs-tools/modules
- 24.sudo update-initramfs -u -k all
- 25.
` - 26.Add rootdelay for slow devices (USB, network storage):
- 27.```bash
- 28.sudo nano /etc/default/grub
- 29.# Add rootdelay=10 to GRUB_CMDLINE_LINUX
- 30.GRUB_CMDLINE_LINUX="root=UUID=xxx rootdelay=10 quiet"
- 31.sudo update-grub
- 32.
`
Prevention
- Always use
UUID=orLABEL=in boot parameters, never/dev/sdXdevice names - Regenerate initramfs after any storage configuration changes
- Test boot after kernel updates in a staging environment
- Include
rootdelay=10for systems booting from USB or network storage - Maintain a bootable rescue USB with the same kernel version as production