New hardware - system does not boot anymore - how to reset systemd/udev?

6,754
  1. Match UUID's...

In terminal...

  • sudo cp /etc/fstab /etc/fstab.bak # make a backup
  • sudo blkid
  • sudo cat /etc/fstab

For every line output from blkid, compare it to any uncommented line in /etc/fstab, and assure that the UUIDs match the respective /dev/sdxx.

  1. Two swap partitions, and no swap definition in /etc/fstab...

Both sda2 and sdb5 are swap partitions. You only need one. Delete /dev/sda2 and uncomment the sdb5 line in /etc/fstab with gksudo gedit /etc/fstab

  1. Unused disks...

Comment out the lines shown below, with gksudo gedit /etc/fstab...

any NTFS mounts

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

UUID=64f30a2f-1c38-40e8-8ab2-7f639b9c3673 /mnt/gentooroot reiserfs user_xattr,acl 0 1

UUID=a448006c-43df-4fbe-be3d-18da22b4e29c /mnt/gentooroot/home reiserfs user_xattr,acl 0 1

Share:
6,754

Related videos on Youtube

Albert
Author by

Albert

I am postgraduate of RWTH Aachen, Germany and received a M.S. Math and a M.S. CompSci. My main interests are Machine Learning, Neural Networks, Artificial Intelligence, Logic, Automata Theory and Programming Languages. And I'm an enthusiastic hobby programmer with a wide range of side projects, mostly in C++ and Python. Homepage GitHub SourceForge HackerNewsers profile page MetaOptimize Q+A

Updated on September 18, 2022

Comments

  • Albert
    Albert over 1 year

    I have Ubuntu 16.04. I just replaced the hardware (new motherboard, new CPU, new GPU, new RAM, new network card, new SATA controller) and now Ubuntu doesn't boot up anymore. After a while, I get into the emergency shell and it seems I have full access to the system there. I was able to manually setup the network (ifconfig en5ps0 up; dhclient en5ps0 <- very strange interface name it came up with). When looking at the journal (journalctl -xb), it seems like it got a timeout while waiting for some disk it does not find anymore.

    Some maybe relevant journal messages:

    ...
    systemd: Received SIGRTMIN+21 from PID 2816 (plymouthd).
    ...
    root: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
    ...
    root: /etc/dhcp/dhclient-enter-hooks.d/samba returned non-zero exit status 1
    ...
    systemd: Received SIGRTMIN+20 from PID 3100 (plymouthd).
    ...
    systemd: dev-disk-by\x2duuid-....device: Job dev-disk-by\x2duuid-...device/start timed out.
    systemd: Timed out waiting for device dev-disk-by\x2duuid-....device.
    -- Subject: Unit dev-disk-by...device has failed
    ...
    -- The result is timeout.
    systemd: Dependency failed for File System Check on /dev/disk/by-uuid/....
    ...
    systemd: Dependency failed for /mnt/....
    ...
    systemd: Dependency failed for Local File Systems.
    ...
    

    /etc/fstab:

    root@gcomputer:~# cat /etc/fstab 
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    
    #/dev/sdb1: UUID="56fc92d2-1903-4263-b88e-d09bc15ef1d3" TYPE="ext4"
    #/dev/sdb2: UUID="f9b799de-c564-4e00-9924-4e8a0ffe8d51" TYPE="swap"
    
    # new SSD (OCZ-VERTEX2_OCZ-K5Q40019666QDZLM)
    UUID=56fc92d2-1903-4263-b88e-d09bc15ef1d3 /               ext4    discard,noatime,user_xattr,acl,relatime,errors=remount-ro 0       1
    
    # /dev/sdb5:
    # UUID=78ca7a27-6fcc-493c-a10a-5ed961a682e5 none            swap    discard,sw              0       0
    
    
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    
    # very old Gentoo (ST380011A_5JVHHAX0)
    UUID=64f30a2f-1c38-40e8-8ab2-7f639b9c3673   /mnt/gentooroot reiserfs    user_xattr,acl  0 1
    UUID=a448006c-43df-4fbe-be3d-18da22b4e29c   /mnt/gentooroot/home    reiserfs    user_xattr,acl  0 1
    
    # oldroot (WDC_WD5000AACS-00G8B1_WD-WCAUK0065639)
    UUID=2474adbe-ca12-4ad1-bea1-1938fdb1c8a4   /mnt/oldroot            ext3    noatime,user_xattr,acl,relatime,errors=remount-ro 0       1
    

    blkid:

    root@gcomputer:~# blkid
    /dev/sda1: UUID="56fc92d2-1903-4263-b88e-d09bc15ef1d3" TYPE="ext4" PTTYPE="dos" PARTUUID="2db0af09-01"
    /dev/sda2: UUID="f9b799de-c564-4e00-9924-4e8a0ffe8d51" TYPE="swap" PARTUUID="2db0af09-02"
    /dev/sdb1: UUID="2474adbe-ca12-4ad1-bea1-1938fdb1c8a4" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="00039d20-01"
    /dev/sdb5: UUID="78ca7a27-6fcc-493c-a10a-5ed961a682e5" TYPE="swap" PARTUUID="00039d20-05"
    

    So, how do I fix this? Why does it even wait for the disk? The root filesystem including home and everything which it needs is already available.

    Do I need to tell udev or systemd or whatever to rescan for new hardware or for new disk ids or so? Why doesn't it do that automatically?

    How would I debug that further?

  • David Foerster
    David Foerster almost 8 years
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
  • Boris Hamanov
    Boris Hamanov almost 8 years
    I suggested that he edit his fstab, that's exactly what he did, and it works now. How isn't that an answer to the question?
  • Huang Dongsung
    Huang Dongsung over 7 years
    you save my day. I wasted for 5 hours due to it in my holiday. :'''(