0

I already posted my problem on askubuntu, but I hope to reach some broader audience here as I also realize it's not really Ubuntu specific.

So I messed up my Ubuntu Server and it doesn't boot anymore. I can tell you why: On the hard drive somehow magically all directories from the "/" disappeared. So when booting into a live linux and trying to mount said harddrive the directory I get into when accessing the hard drive is what is usually found under /boot, but this is the directory that is mounted. So obviously on boot grub doesn't find /dev, /root, /home or any folder on the root of the drive. They're still there: when I look at the drive in gparted it says ~10GB used which is what the Server was, when right clicking on the drive in the live system it only says ~140MB which is what is in the folder that is displayed.

What I did that caused it: I installed a new hard drive to the server, formatted it and wanted to statically mount it in /etc/fstab but i think i messed up the UUID (didn't copy properly, forgot a character or so, but didn't realize until I rebooted.

When booting it says:

"Gave up waiting for root device. Common Problems: 
  - Boot args (cat /proc/cmdline) 
    - Check rootdelay = (did the system wait long enough?) 
    - Check root = (did the system wait for the right device?)
   - Missing module (cat /proc/modules; ls /dev) 
ALERT! /dev/mapper/server--vg-root does not exist. Dropping to shell!"

Which makes sense because right now there is no /dev/...

Help?

Edit:

Output of lsblk:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 298.1G  0 disk 
└─sda1   8:1    0 298.1G  0 part 
sdb      8:16   1  14.7G  0 disk 
└─sdb1   8:17   1  14.7G  0 part /cdrom
loop0    7:0    0   953M  1 loop /rofs

Output of lvscan(run with sudo):

  No volume groups found

Output of pvscan:

No matching physical volumes found

Output of parted --> print all:

Model: ATA WDC WD3200AAKS-7 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  320GB  320GB  primary  ext4         boot


Model: JetFlash Transcend 16GB (scsi)
Disk /dev/sdb: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  15.8GB  15.8GB  primary  fat32        boot, lba

Output of pvdisplay /dev/sda1

 No physical volume label read from /dev/sda1
 Failed to read physical volume "/dev/sda1"

Output of file -s /dev/sda1

/dev/sda1: no read permission
7
  • Can you add the output of lsblk and lvscan from your live system to make your setup more clear? Jul 27, 2015 at 18:21
  • edited start post
    – Fabian
    Jul 27, 2015 at 20:56
  • Run pvscan and vgscan (I think either will do). (@JodkaLemon Since no physical volumes are known to the system, it's too early for lvscan.) What's the output of file -s /dev/sd?? ? Jul 27, 2015 at 23:35
  • you should also give some sort of listing for the partition tables use 'parted' and then 'print all' Jul 28, 2015 at 0:38
  • now pvdisplay /dev/sda1 Jul 28, 2015 at 7:28

1 Answer 1

0

As you already indicated, you very likely messed up fstab. From what you are describing, it looks like you've mounted the partition that contains boot on /, overriding what was already there.

What you can do in you live system is to create one or more directories under / (doesn't really matter where), one directory for each partition that gparted reports there are on your disk. Then, manually mount these partitions on these new directories.

One of these will contain /etc. There you will find your fstab and, hopefully, the backup of fstab you made before you started experimenting.

2
  • If I'm not mistaken this only changes the mount point of the drive?!
    – Fabian
    Jul 29, 2015 at 19:20
  • That is correct. What could be happening in your case it that the partition containing boot is mounted on / instead of on /boot, making what is under / "disappear". This is for instance used to mount people's home drives across different machines so you always have the same home drive on each machine you log in.
    – NZD
    Jul 29, 2015 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .