LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Edited crypttab and fstab, now system doesn't start. (http://www.linuxquestions.org/questions/linux-newbie-8/edited-crypttab-and-fstab-now-system-doesn%27t-start-943282/)

1937 05-04-2012 10:57 AM

Edited crypttab and fstab, now system doesn't start.
 
I'm using Ubuntu 12.04 AMD64 Precise Pangolin with two encrypted hard drives using LVM. After installing Ubuntu I tried adding the second hard drive to crypttab and fstab so it would be mounted at startup, but apparently I did something wrong, as after rebooting I'm sent to BusyBox.

I burned an Ubuntu live cd (12.04) and was able to mount the second hard drive, but not the system drive where I was hoping to edit crypttab and fstab again so I'd be able to boot normally.

Here's what happens when I try to mount it:

Quote:

ubuntu@ubuntu:~$ sudo mount /dev/ubuntu/root /mnt/ubu
mount: wrong fs type, bad option, bad superblock on /dev/mapper/ubuntu-root,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Quote:

ubuntu@ubuntu:~$ dmesg | tail
[ 4296.380427] sd 1:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 4296.380434] sd 1:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[ 4296.380442] Descriptor sense data with sense descriptors (in hex):
[ 4296.380447] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 4296.380468] 00 07 b9 cb
[ 4296.380477] sd 1:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[ 4296.380488] sd 1:0:0:0: [sda] CDB: Read(10): 28 00 00 07 b9 c8 00 00 08 00
[ 4296.380507] end_request: I/O error, dev sda, sector 506315
[ 4296.380541] EXT4-fs (dm-1): can't read group descriptor 8
[ 4296.380545] ata2: EH complete
Some more info:


Quote:


blkid
/dev/sr0: LABEL="Ubuntu 12.04 LTS i386" TYPE="iso9660"

Quote:


lvdisplay
--- Logical volume ---
LV Name /dev/ubuntu/root
VG Name ubuntu
LV UUID l8MCAl-M36n-NcMY-7kzd-3CPD-BrcT-E0xRFg
LV Write Access read/write
LV Status available
# open 0
LV Size 461,48 GiB
Current LE 118140
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1

--- Logical volume ---
LV Name /dev/ubuntu/swap_1
VG Name ubuntu
LV UUID qyAaOe-NEza-YD0a-yJEW-IhvH-YXwz-A14F33
LV Write Access read/write
LV Status available
# open 0
LV Size 3,99 GiB
Current LE 1021
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:2

Quote:


lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices
root ubuntu -wi-a- 461,48g /dev/dm-0(0)
swap_1 ubuntu -wi-a- 3,99g /dev/dm-0(118140)

Quote:


pvdisplay
--- Physical volume ---
PV Name /dev/dm-0
VG Name ubuntu
PV Size 465,52 GiB / not usable 4,00 MiB
Allocatable yes
PE Size 4,00 MiB
Total PE 119172
Free PE 11
Allocated PE 119161
PV UUID fxBHDJ-JpoG-cPlO-d3Ho-JHPm-tHBW-ITepbZ

Quote:


NAME TYPE FSTYPE LABEL SIZE MODEL MOUNTPOINT
loop0 loop 672M /rofs
sr0 rom iso9660 Ubuntu 12.04 LTS i386
701,6M CDDVDW S /cdrom
sda disk 465,8G HDS72505
├─sda1 part 243M
├─sda2 part 1K
└─sda5 part 465,5G
└─udisks-luks-uuid-854d332c-cbcd-4e1b-b545-7169f46afb63-uid999 (dm-0) crypt 465,5G
├─ubuntu-root (dm-1) lvm 461,5G
└─ubuntu-swap_1 (dm-2) lvm 4G
sdb disk 1,8T WDC WD20
└─sdb1 part 1,8T

unSpawn 05-04-2012 11:16 AM

- What changes did you make exactly?
- Did you make a backup before fscking around?
- Have you tried rebooting w/o the 2nd disk attached?
- Have you looked at this, this or this procedure-wise?

1937 05-04-2012 12:52 PM

I added this line to crypttab
Quote:

sdb1_crypt UUID=667af198-3973-41e8-a127-874a2f5a9fbf none luks
and I *think* I added this to fstab
Quote:

/dev/mapper/debian-disk /disk ext4 errors=remount-ro 0 1
I do have a backup since installing Ubuntu a few days ago (switching from Debian) but I moved some files to the drive I can't access instead of copying.

I looked at your links but I'm not sure they'd help here.

1937 05-04-2012 02:02 PM

Solved by running
Quote:

sudo fsck.ext4 -v /dev/ubuntu/root


All times are GMT -5. The time now is 06:06 PM.