LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-19-2013, 04:33 AM   #1
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Rep: Reputation: 17
help: can't boot because all files in /boot vanished


All of a sudden, I cannot boot my 64-bit ubuntu 12.04 system.

The following is what happened, and the nature of my system.

Generally my system performs updates when I tell it to. It displays some kind of update window, and I click a button to start the process.

Tonight some kind of update just seemed to start without me doing anything, and without the normal update window being displayed at all (though the update application was in the task bar I have at the bottom of the display). A small progress window displayed some files being installed, but I didn't notice what they were, because I only noticed it was happening near the end of the process.

Upon reboot, it displayed the following:

Loading Operating System ...
Boot from CD/DVD :
Boot from CD/DVD :
error: out of partition
grub rescue>

I had no idea what that signified, so I rebooted, changed the disk drive bootup order to another drive (that also contains 64-bit ubuntu 12.04) and that booted up.

The first thing I did was look inside the /boot directory of the drive that failed to boot, and found it contains NO FILES WHATSOEVER.

I have no idea how this happened, but I assume that strange update process must be responsible.

This computer has multiple hard drives, but is a "linux only" computer. There are NO dual boot disks in the system --- they are all either complete ubuntu 12.04 boot disks, or they have no OS at all and just exist to save data onto. Therefore, this is the most vanilla possible setup (except for having multiple hard disks).

The /boot directory on the hard drive that doesn't boot any more is a separate partition.

The only thing I can think of that might have been slightly funky is the size of that partition. A couple times in the past when an update was happening it reported not having enough room to store files in the /boot directory. I would simply delete the 2 or 3 oldest of the files with version numbers in their names, then continue the process. This always worked fine. Nothing similar happened during this funky update that just happened (no error messages, no prompts).

What on earth would delete ALL files from the /boot directory?

More importantly, how can I fix this and continue booting from this disk?

The drive that won't boot is 2TB. The drive that does boot is 3TB, but doesn't have my programs or data on it.

Per usual application of Murphy's Law, this happened at the worst possible time. I have work I desperately need to do on this system, this is where all my email gets handled (via Thunderbird), and I have a big shot calling tomorrow morning and I need to run programs on this system! AARG.

How do I get this boot disk to boot again?
 
Old 08-19-2013, 06:04 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
The first thing I did was look inside the /boot directory of the drive that failed to boot, and found it contains NO FILES WHATSOEVER.
These files are on separate partition which is not automatically mounted on another system, you need to mount it by hand.

Please show output of these commands
Code:
sudo fdisk -l
ls -la /dev/disk/by-uuid

# Mount non working root partition for example, if it was /dev/sda2
sudo mkdir /mnt/root
sudo mount /dev/sda2 /mnt/root
cat /mnt/root/etc/fstab

# Mount non working boot partition for example, if it was /dev/sda1
sudo mkdir /mnt/boot
sudo mount /dev/sda1 /mnt/boot
ls -la /mnt/boot
If mounting was unsuccessful, do check disk, ex. "sudo fsck /dev/sda1".

Quote:
A couple times in the past when an update was happening it reported not having enough room to store files in the /boot directory. I would simply delete the 2 or 3 oldest of the files with version numbers in their names, then continue the process.
Not a good idea, but I don't known if it has any connection to this problem. You should remove old kernels by package manager.

Last edited by eSelix; 08-19-2013 at 06:14 AM.
 
Old 08-19-2013, 03:40 PM   #3
albinard
Member
 
Registered: Jan 2011
Location: New Mexico
Distribution: Xubuntu Core
Posts: 185

Rep: Reputation: 59
The classic way to remove an old kernel is:

Code:
sudo rm *3.2.0-42*
If you have accumulated a whole lot of them, you can even use:

Code:
sudo rm *3.2.0-4[2,3,4,5]*
 
Old 08-19-2013, 04:19 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by albinard View Post
The classic way to remove an old kernel is:

Code:
sudo rm *3.2.0-42*
If you have accumulated a whole lot of them, you can even use:

Code:
sudo rm *3.2.0-4[2,3,4,5]*
Only if you like to mess up your package management system. Those files belong to installed packages and should be removed by the package manager, not manually.
 
Old 08-19-2013, 04:32 PM   #5
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Original Poster
Rep: Reputation: 17
#
#
# sudo fdisk -l
#

Code:
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004478d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      200703       99328   83  Linux
/dev/sda2          200704    16977919     8388608   82  Linux swap / Solaris
/dev/sda3        16977920  3907028991  1945025536   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'!
The util fdisk doesn't support GPT.  Use GNU Parted


Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.
#
#
# ls -la /dev/disk/by-uuid
#

Code:
total 0
drwxr-xr-x 2 root root 200 Aug 19 11:20 .
drwxr-xr-x 7 root root 140 Aug 19 11:20 ..
lrwxrwxrwx 1 root root  10 Aug 19 11:20 0b1f52c8-448d-4282-9be4-7bb19b504ddd -> ../../sdb3
lrwxrwxrwx 1 root root  10 Aug 19 11:20 38642761-e929-4cae-95a1-7c056dddc877 -> ../../sda3
lrwxrwxrwx 1 root root  10 Aug 19 11:20 63f88a21-7cc8-4bc1-990e-af1f060d2b67 -> ../../sdb2
lrwxrwxrwx 1 root root  10 Aug 19 11:20 7c41a73c-1c75-45c5-b45b-670a16477819 -> ../../sda2
lrwxrwxrwx 1 root root  10 Aug 19 11:20 8a8cd15b-d2b2-43a0-979e-0f9bc08dc074 -> ../../sda1
lrwxrwxrwx 1 root root  10 Aug 19 11:20 c3f40817-c730-41dc-9f13-f41f36cf4249 -> ../../sdb4
lrwxrwxrwx 1 root root  10 Aug 19 11:20 C67D-DDA1 -> ../../sdb1
lrwxrwxrwx 1 root root  10 Aug 19 11:20 d4233347-b66a-4add-bffa-f7317c055646 -> ../../sdc1
#
#
# sudo mkdir /mnt/root
# sudo mount /dev/sda3 /mnt/root
# cat /mnt/root/etc/fstab
#

Code:
# /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>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda3 during installation
UUID=38642761-e929-4cae-95a1-7c056dddc877 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=8a8cd15b-d2b2-43a0-979e-0f9bc08dc074 /boot           ext2    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=7c41a73c-1c75-45c5-b45b-670a16477819 none            swap    sw              0       0
# swap was on /dev/sdb2 during installation
UUID=d34bc266-06fa-42e2-b560-0c8773c93f9c none            swap    sw              0       0
# swap was on /dev/sdc3 during installation
UUID=9147bf77-86f4-4344-8cf7-3d0f53c114ad none            swap    sw              0       0
# swap was on /dev/sdd2 during installation
UUID=3d50065b-0d74-46c9-9222-597a06cd1c6f none            swap    sw              0       0
#
#
# sudo mkdir /mnt/boot
# sudo mount /dev/sda1 /mnt/boot
# ls -la /mnt/boot
#

Code:
total 68806
drwxr-xr-x 4 root root     1024 Jun  2 02:07 .
drwxr-xr-x 4 root root     4096 Aug 19 14:39 ..
-rw-r--r-- 1 root root   792587 Nov 15  2012 abi-3.2.0-34-generic
-rw-r--r-- 1 root root   792715 Dec  5  2012 abi-3.2.0-35-generic
-rw-r--r-- 1 root root   844937 Oct 25  2012 abi-3.5.0-18-generic
-rw-r--r-- 1 root root   140505 Nov 15  2012 config-3.2.0-34-generic
-rw-r--r-- 1 root root   140505 Dec  5  2012 config-3.2.0-35-generic
-rw-r--r-- 1 root root   147884 Oct 25  2012 config-3.5.0-18-generic
drwxr-xr-x 3 root root     5120 Feb 14  2013 grub
-rw-r--r-- 1 root root 14212234 Dec 18  2012 initrd.img-3.2.0-34-generic
-rw-r--r-- 1 root root 13493002 Jan 13  2013 initrd.img-3.2.0-35-generic
-rw-r--r-- 1 root root 15295620 Jun  2 02:07 initrd.img-3.5.0-18-generic
drwxr-xr-x 2 root root    12288 Jun 14  2012 lost+found
-rw-r--r-- 1 root root   176764 Nov 27  2011 memtest86+.bin
-rw-r--r-- 1 root root   178944 Nov 27  2011 memtest86+_multiboot.bin
-rw------- 1 root root  2885127 Nov 15  2012 System.map-3.2.0-34-generic
-rw------- 1 root root  2885822 Dec  5  2012 System.map-3.2.0-35-generic
-rw------- 1 root root  3021841 Oct 25  2012 System.map-3.5.0-18-generic
-rw------- 1 root root  4967632 Nov 15  2012 vmlinuz-3.2.0-34-generic
-rw------- 1 root root  4968400 Dec  5  2012 vmlinuz-3.2.0-35-generic
-rw------- 1 root root  5186688 Oct 25  2012 vmlinuz-3.5.0-18-generic
Very interesting. This shows reasonable contents in the /boot directory on that drive. However, I notice one strange thing. The date on file initrd.img-3.5.0-18-generic is completely different from the other files of the same version number. Hmmm. On the other hand, the dates on all the initrd.img files are inconsistent, so... maybe that's not an issue.

I do note that all the highest version numbers are 3.5.0 which looks to me like a big step newer from the others, which are all 3.2.0.

Anyway, what do you make of this output?

Note that one of the drives (the 3TB drive) is EFI, so some of the output isn't exactly what you wanted to see. Also note the sector alignment message on the EFI drive... not sure whether to worry about that or not. But the EFI drive is not the drive that stopped booting - that was the 2TB drive.

Does that "errors=remount-ro" message mean anything to you?

Any ideas?

Last edited by maxreason; 08-19-2013 at 04:59 PM.
 
Old 08-20-2013, 04:44 AM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
These "initrd.img-*" files are generated dynamically, so time may differ. "errors=remount-ro" is protection in case some errors are detected, its only mean to remount then filesystem as read only (other way this filesystem would be not mounted at all). I don't see nothing unusual here, besides harmless
Code:
# swap was on /dev/sdb2 during installation
UUID=d34bc266-06fa-42e2-b560-0c8773c93f9c none            swap    sw              0       0
# swap was on /dev/sdc3 during installation
UUID=9147bf77-86f4-4344-8cf7-3d0f53c114ad none            swap    sw              0       0
# swap was on /dev/sdd2 during installation
UUID=3d50065b-0d74-46c9-9222-597a06cd1c6f none            swap    sw              0       0
which can be removed from fstab if you have no other drives.

About "sector alignment message on the EFI drive" I think this is only false message, due fdisk is not supporting GPT.

Can you also show file "cat /mnt/boot/grub/grub.cfg"?

After that, reboot to your non working system and from grub command line enter "ls -l /". It should show files from your boot partition. If yes, then check if you can boot manually, check first by "ls" what partitions you have it should display something similar to "(hd0) (hd0,msdos1) (hd0,msdos2) (hd0,msdos3)"
Code:
set root='hd0,msdos3'
linux vmlinuz-3.5.0-18-generic root=UUID=38642761-e929-4cae-95a1-7c056dddc877
initrd initrd.img-3.5.0-18-generic
boot

Last edited by eSelix; 08-20-2013 at 04:50 AM.
 
Old 08-20-2013, 11:41 AM   #7
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Original Poster
Rep: Reputation: 17
The extra junk in the fstab file is because I disconnected 3 extra data-only drives so the output generated by your requested commands aren't full of worthless garbage. Once I get the drive booting up again, I'll reconnect those drives (two internal SATA2 drives and one external USB drive). So I'll leave the fstab file alone.

Okay, your next request produced some completely WACKO results. Hope you know what it means.


#
#
# sudo mount /dev/sda1 /mnt/boot
# cd /mnt/boot/grub
# ls -la
#

Code:
total 2548
drwxr-xr-x 3 root root    5120 Feb 14  2013 .
drwxr-xr-x 4 root root    1024 Jun  2 02:07 ..
-????????? ? ?    ?          ?            ? 915resolution.mod
-????????? ? ?    ?          ?            ? acpi.mod
-????????? ? ?    ?          ?            ? adler32.mod
-????????? ? ?    ?          ?            ? affs.mod
-????????? ? ?    ?          ?            ? afs_be.mod
-????????? ? ?    ?          ?            ? afs.mod
-????????? ? ?    ?          ?            ? aout.mod
-????????? ? ?    ?          ?            ? ata.mod
-????????? ? ?    ?          ?            ? ata_pthru.mod
-????????? ? ?    ?          ?            ? at_keyboard.mod
-????????? ? ?    ?          ?            ? befs_be.mod
-????????? ? ?    ?          ?            ? befs.mod
-????????? ? ?    ?          ?            ? biosdisk.mod
-????????? ? ?    ?          ?            ? bitmap.mod
-????????? ? ?    ?          ?            ? bitmap_scale.mod
-????????? ? ?    ?          ?            ? blocklist.mod
-????????? ? ?    ?          ?            ? boot.img
-????????? ? ?    ?          ?            ? boot.mod
-????????? ? ?    ?          ?            ? bsd.mod
-????????? ? ?    ?          ?            ? btrfs.mod
-????????? ? ?    ?          ?            ? bufio.mod
-????????? ? ?    ?          ?            ? cat.mod
-????????? ? ?    ?          ?            ? cdboot.img
-????????? ? ?    ?          ?            ? chain.mod
-????????? ? ?    ?          ?            ? cmostest.mod
-????????? ? ?    ?          ?            ? cmp.mod
-????????? ? ?    ?          ?            ? command.lst
-????????? ? ?    ?          ?            ? configfile.mod
-rw-r--r-- 1 root root   26050 Aug 18 23:51 core.img
-????????? ? ?    ?          ?            ? cpio.mod
-????????? ? ?    ?          ?            ? cpuid.mod
-????????? ? ?    ?          ?            ? crypto.lst
-????????? ? ?    ?          ?            ? crypto.mod
-????????? ? ?    ?          ?            ? cs5536.mod
-????????? ? ?    ?          ?            ? datehook.mod
-????????? ? ?    ?          ?            ? date.mod
-????????? ? ?    ?          ?            ? datetime.mod
-????????? ? ?    ?          ?            ? diskboot.img
-????????? ? ?    ?          ?            ? dm_nv.mod
-????????? ? ?    ?          ?            ? drivemap.mod
-????????? ? ?    ?          ?            ? echo.mod
-????????? ? ?    ?          ?            ? efiemu32.o
-????????? ? ?    ?          ?            ? efiemu64.o
-????????? ? ?    ?          ?            ? efiemu.mod
-????????? ? ?    ?          ?            ? elf.mod
-????????? ? ?    ?          ?            ? example_functional_test.mod
-????????? ? ?    ?          ?            ? ext2.mod
-????????? ? ?    ?          ?            ? extcmd.mod
-????????? ? ?    ?          ?            ? fat.mod
-????????? ? ?    ?          ?            ? font.mod
-????????? ? ?    ?          ?            ? fshelp.mod
-????????? ? ?    ?          ?            ? fs.lst
-????????? ? ?    ?          ?            ? functional_test.mod
-????????? ? ?    ?          ?            ? g2hdr.img
-????????? ? ?    ?          ?            ? gcry_arcfour.mod
-????????? ? ?    ?          ?            ? gcry_blowfish.mod
-????????? ? ?    ?          ?            ? gcry_camellia.mod
-????????? ? ?    ?          ?            ? gcry_cast5.mod
-????????? ? ?    ?          ?            ? gcry_crc.mod
-????????? ? ?    ?          ?            ? gcry_des.mod
-????????? ? ?    ?          ?            ? gcry_md4.mod
-????????? ? ?    ?          ?            ? gcry_md5.mod
-????????? ? ?    ?          ?            ? gcry_rfc2268.mod
-????????? ? ?    ?          ?            ? gcry_rijndael.mod
-????????? ? ?    ?          ?            ? gcry_rmd160.mod
-????????? ? ?    ?          ?            ? gcry_seed.mod
-????????? ? ?    ?          ?            ? gcry_serpent.mod
-????????? ? ?    ?          ?            ? gcry_sha1.mod
-????????? ? ?    ?          ?            ? gcry_sha256.mod
-????????? ? ?    ?          ?            ? gcry_sha512.mod
-????????? ? ?    ?          ?            ? gcry_tiger.mod
-????????? ? ?    ?          ?            ? gcry_twofish.mod
-????????? ? ?    ?          ?            ? gcry_whirlpool.mod
-????????? ? ?    ?          ?            ? gettext.mod
-rw-r--r-- 1 root root     906 Jan 13  2013 gfxblacklist.txt
-????????? ? ?    ?          ?            ? gfxmenu.mod
-????????? ? ?    ?          ?            ? gfxterm.mod
-????????? ? ?    ?          ?            ? gptsync.mod
-????????? ? ?    ?          ?            ? grldr.img
-????????? ? ?    ?          ?            ? grub.cfg
-rw-r--r-- 1 root root    1024 Aug 18 23:51 grubenv
-????????? ? ?    ?          ?            ? gzio.mod
-????????? ? ?    ?          ?            ? halt.mod
-????????? ? ?    ?          ?            ? hashsum.mod
-????????? ? ?    ?          ?            ? hdparm.mod
-????????? ? ?    ?          ?            ? hello.mod
-????????? ? ?    ?          ?            ? help.mod
-????????? ? ?    ?          ?            ? hexdump.mod
-????????? ? ?    ?          ?            ? hfs.mod
-????????? ? ?    ?          ?            ? hfsplus.mod
-????????? ? ?    ?          ?            ? hwmatch.mod
-????????? ? ?    ?          ?            ? iorw.mod
-????????? ? ?    ?          ?            ? iso9660.mod
-????????? ? ?    ?          ?            ? jfs.mod
-????????? ? ?    ?          ?            ? jpeg.mod
-????????? ? ?    ?          ?            ? kernel.img
-????????? ? ?    ?          ?            ? keylayouts.mod
-????????? ? ?    ?          ?            ? keystatus.mod
-????????? ? ?    ?          ?            ? legacycfg.mod
-????????? ? ?    ?          ?            ? linux16.mod
-????????? ? ?    ?          ?            ? linux.mod
-????????? ? ?    ?          ?            ? lnxboot.img
-????????? ? ?    ?          ?            ? loadenv.mod
drwxr-xr-x 2 root root    1024 Jun 14  2012 locale
-????????? ? ?    ?          ?            ? loopback.mod
-????????? ? ?    ?          ?            ? lsacpi.mod
-????????? ? ?    ?          ?            ? lsapm.mod
-????????? ? ?    ?          ?            ? lsmmap.mod
-????????? ? ?    ?          ?            ? ls.mod
-????????? ? ?    ?          ?            ? lspci.mod
-????????? ? ?    ?          ?            ? lvm.mod
-????????? ? ?    ?          ?            ? lzopio.mod
-????????? ? ?    ?          ?            ? mdraid09.mod
-????????? ? ?    ?          ?            ? mdraid1x.mod
-????????? ? ?    ?          ?            ? memdisk.mod
-????????? ? ?    ?          ?            ? memrw.mod
-????????? ? ?    ?          ?            ? minicmd.mod
-????????? ? ?    ?          ?            ? minix2.mod
-????????? ? ?    ?          ?            ? minix.mod
-????????? ? ?    ?          ?            ? mmap.mod
-????????? ? ?    ?          ?            ? moddep.lst
-????????? ? ?    ?          ?            ? msdospart.mod
-????????? ? ?    ?          ?            ? multiboot2.mod
-????????? ? ?    ?          ?            ? multiboot.mod
-????????? ? ?    ?          ?            ? nilfs2.mod
-????????? ? ?    ?          ?            ? normal.mod
-????????? ? ?    ?          ?            ? ntfscomp.mod
-????????? ? ?    ?          ?            ? ntfs.mod
-????????? ? ?    ?          ?            ? ntldr.mod
-????????? ? ?    ?          ?            ? ohci.mod
-????????? ? ?    ?          ?            ? part_acorn.mod
-????????? ? ?    ?          ?            ? part_amiga.mod
-????????? ? ?    ?          ?            ? part_apple.mod
-????????? ? ?    ?          ?            ? part_bsd.mod
-????????? ? ?    ?          ?            ? part_gpt.mod
-????????? ? ?    ?          ?            ? partmap.lst
-????????? ? ?    ?          ?            ? part_msdos.mod
-????????? ? ?    ?          ?            ? part_sun.mod
-????????? ? ?    ?          ?            ? part_sunpc.mod
-????????? ? ?    ?          ?            ? parttool.lst
-????????? ? ?    ?          ?            ? parttool.mod
-????????? ? ?    ?          ?            ? password.mod
-????????? ? ?    ?          ?            ? password_pbkdf2.mod
-????????? ? ?    ?          ?            ? pbkdf2.mod
-????????? ? ?    ?          ?            ? pci.mod
-????????? ? ?    ?          ?            ? play.mod
-????????? ? ?    ?          ?            ? png.mod
-????????? ? ?    ?          ?            ? probe.mod
-????????? ? ?    ?          ?            ? pxeboot.img
-????????? ? ?    ?          ?            ? pxecmd.mod
-????????? ? ?    ?          ?            ? pxe.mod
-????????? ? ?    ?          ?            ? raid5rec.mod
-????????? ? ?    ?          ?            ? raid6rec.mod
-????????? ? ?    ?          ?            ? raid.mod
-????????? ? ?    ?          ?            ? read.mod
-????????? ? ?    ?          ?            ? reboot.mod
-????????? ? ?    ?          ?            ? regexp.mod
-????????? ? ?    ?          ?            ? reiserfs.mod
-????????? ? ?    ?          ?            ? relocator.mod
-????????? ? ?    ?          ?            ? scsi.mod
-????????? ? ?    ?          ?            ? search_fs_file.mod
-????????? ? ?    ?          ?            ? search_fs_uuid.mod
-????????? ? ?    ?          ?            ? search_label.mod
-????????? ? ?    ?          ?            ? search.mod
-????????? ? ?    ?          ?            ? sendkey.mod
-????????? ? ?    ?          ?            ? serial.mod
-????????? ? ?    ?          ?            ? setjmp.mod
-????????? ? ?    ?          ?            ? setpci.mod
-????????? ? ?    ?          ?            ? sfs.mod
-????????? ? ?    ?          ?            ? sleep.mod
-????????? ? ?    ?          ?            ? squash4.mod
-????????? ? ?    ?          ?            ? tar.mod
-????????? ? ?    ?          ?            ? terminal.lst
-????????? ? ?    ?          ?            ? terminal.mod
-????????? ? ?    ?          ?            ? terminfo.mod
-????????? ? ?    ?          ?            ? test_blockarg.mod
-????????? ? ?    ?          ?            ? testload.mod
-????????? ? ?    ?          ?            ? test.mod
-????????? ? ?    ?          ?            ? tga.mod
-????????? ? ?    ?          ?            ? trig.mod
-????????? ? ?    ?          ?            ? true.mod
-????????? ? ?    ?          ?            ? udf.mod
-????????? ? ?    ?          ?            ? ufs1.mod
-????????? ? ?    ?          ?            ? ufs2.mod
-????????? ? ?    ?          ?            ? uhci.mod
-rw-r--r-- 1 root root 2560080 Feb 14  2013 unicode.pf2
-????????? ? ?    ?          ?            ? usb_keyboard.mod
-????????? ? ?    ?          ?            ? usb.mod
-????????? ? ?    ?          ?            ? usbms.mod
-????????? ? ?    ?          ?            ? usbserial_common.mod
-????????? ? ?    ?          ?            ? usbserial_ftdi.mod
-????????? ? ?    ?          ?            ? usbserial_pl2303.mod
-????????? ? ?    ?          ?            ? usbtest.mod
-????????? ? ?    ?          ?            ? vbe.mod
-????????? ? ?    ?          ?            ? vga.mod
-????????? ? ?    ?          ?            ? vga_text.mod
-????????? ? ?    ?          ?            ? video_bochs.mod
-????????? ? ?    ?          ?            ? video_cirrus.mod
-????????? ? ?    ?          ?            ? video_fb.mod
-????????? ? ?    ?          ?            ? videoinfo.mod
-????????? ? ?    ?          ?            ? video.lst
-????????? ? ?    ?          ?            ? video.mod
-????????? ? ?    ?          ?            ? videotest.mod
-????????? ? ?    ?          ?            ? xfs.mod
-????????? ? ?    ?          ?            ? xnu.mod
-????????? ? ?    ?          ?            ? xnu_uuid.mod
-????????? ? ?    ?          ?            ? xzio.mod
-????????? ? ?    ?          ?            ? zfsinfo.mod
-????????? ? ?    ?          ?            ? zfs.mod
Note: When I redirected the output of "ls -la" to a text file to copy and paste here, it printed to the terminal lines like the following for [presumably] every file shown above [with ? marks].

Code:
ls: cannot access grub.cfg
Presumably these lines displayed on the terminal were sent to stderr while the normal output shown previously was redirected into the text file I specified.

So, of course, when I entered...


cat /mnt/boot/grub/grub.cfg

... the output was:

cat: grub.cfg: Input/output error

Do you understand this? Apparently the "ls -la" command can see all the files and their filenames, but not the permissions [and possibly other information???] for most but not all the files. The "locale" subdirectory contains files with reasonable permissions.

Do you understand this? How do I extract myself from this mess and make this drive boot again?

Please don't say "it is hopeless". But if you absolutely must, how can I keep from losing everything on this drive? This drive contains EVERYTHING, all my many email accounts (thunderbird), my software development (codeblocks), and endless other stuff. True, it isn't difficult to copy document files, source files, images and such, but, but, but... there's just so many configurations of so many applications that I can't possibly remember or reproduce. So let's figure out how to make this drive boot if possible!

Thanks for helping. I appreciate it more than you know.

Last edited by maxreason; 08-20-2013 at 11:49 AM.
 
Old 08-20-2013, 12:01 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
It seems to me that the filesystem of your /boot partition is seriously broken, the files you see in your output should reside in /boot/grub, the I/O-errors you get support this also. I recommend to test this disk with the disk manufacturer's diagnosis tool to rule out hardware errors, if there is no hardware error format this partition and copy the files from your backup over.
 
Old 08-20-2013, 02:43 PM   #9
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by TobiSGD View Post
It seems to me that the filesystem of your /boot partition is seriously broken, the files you see in your output should reside in /boot/grub, the I/O-errors you get support this also. I recommend to test this disk with the disk manufacturer's diagnosis tool to rule out hardware errors, if there is no hardware error format this partition and copy the files from your backup over.
What backup? Are the files in this directory automagically backed up somewhere?

Last edited by maxreason; 08-20-2013 at 02:46 PM.
 
Old 08-20-2013, 02:46 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
The backup you should have in the first place. If you don't have one you can try if formatting the partition, mounting it and reinstalling the packages with the files that belong into /boot (usually bootloader and kernel) helps.
 
Old 08-20-2013, 02:55 PM   #11
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Originally Posted by maxreason View Post
What backup?
There is someone on the forum with signature like "There are two kind of people, these who make backups and these who will make backups." Anyway, can you test if you can mount from working system root partition "/dev/sda3"? There should be your "/home" directory.

You can also use "GSmartControl" package to check status (errors) of your drive.

Last edited by eSelix; 08-20-2013 at 03:01 PM.
 
Old 08-20-2013, 03:03 PM   #12
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by TobiSGD View Post
The backup you should have in the first place. If you don't have one you can try if formatting the partition, mounting it and reinstalling the packages with the files that belong into /boot (usually bootloader and kernel) helps.
Are you saying that no file in /boot is changed periodically, or changed as a result of the specific disks in the system?

I mean, I can get another 2TB disk, then do a complete install of the same version of ubuntu off the exact same install DVD. That should create an identical STARTING /boot directory, meaning a /boot directory in the startup state. Then I could reformat the /boot partition on the problem drive, then copy all files across from the new drive. If I do this, must I make all the partitions exactly the same size as the defective drive or risk some file in the /boot directory contain erroneous information? Probably gparted or something would tell me the exact partition sizes, and I can probably find an identical 2TB drive still for sale.

I assume I cannot do that from the /boot directory in the 3TB drive, because the drive is a different size, is EFI, and therefore is partitioned differently.

However, this presumes none of the files in /boot (or subdirectory /boot/locale) get changed by updates or for other reasons from time to time. If files DO get changed, such a copy might cause disaster, as file contents indicate system status that does not exist.

An alternative. Is there a way for me to create a complete new 2TB boot drive, then somehow know what to copy across to create a duplicate drive (except this /boot partition)? I mean, could I literally copy everything on the entire defective drive EXCEPT the /boot partition and end up with a working version of the defective drive?

What's the best approach?

PS: I have no idea how to figure out which applications are responsible for creating every single file in the /boot partition, or which might be changed by updates, or which might be changed from time to time for reasons unknown to me. Does anyone?

Last edited by maxreason; 08-20-2013 at 03:24 PM.
 
Old 08-20-2013, 03:10 PM   #13
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit linux mint v20
Posts: 259

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by eSelix View Post
There is someone on the forum with signature like "There are two kind of people, these who make backups and these who will make backups." Anyway, can you test if you can mount from working system root partition "/dev/sda3"? There should be your "/home" directory.

You can also use "GSmartControl" package to check status (errors) of your drive.
I don't know enough about backups, but... do people really back up system partitions like this? Seems like a backup of the entire system would be required to start, doubling storage requirements.

Furthermore, it also seems like one would need to create at least an incremental backup every single time they power down their computer. That seems like a sure way to fill up a drive with backup files in short order. Plus, how long would that add to the shutdown sequence anyway (to search the entire filesystem and backup all changed files in an incremental way)?

Every time I've ever read about backup techniques, I decide they are very difficult, probably not reliable, and figure that Murphy's Law dictates they probably won't actually work much of the time.

I thought I already did what you say (mount both /root (which contains home) and also /boot). I don't have a separate partition for /home, if that's what you mean. /home is just a subdirectory of /root.

I'll try out GSmartControl and see what that does and reports.

Later: I installed and ran GSmartControl on the defective 2TB drive and it shows that SMART is supported and enabled, and no errors have been logged. I ran the "perform tests" feature and it found no errors.

Last edited by maxreason; 08-20-2013 at 03:30 PM.
 
Old 08-20-2013, 03:43 PM   #14
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Backing up in a tarball doesn't take near as much room as non compressed backups do. Really not hard to do.

I, personally, do not back up my system files although I do back up my data files.

Just out of curiousity, did you simply try chrooting into the system and run;
Code:
apt-get purge grub-pc grub-common
which should get rid of your left over files whereever they may be.
Code:
apt-get install grub-pc grub-common
?
 
Old 08-20-2013, 03:45 PM   #15
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
The files in "/boot" directory are created by only two packages with dependencies: "grub" and "linux", the first also make bootsector.

About backup it depends how important is data and how often you change it. If you have not very important data, like stuff dowloaded from Internet (which can be downloaded again) you can make copy of it for example once a month. Very important data, like your job could be copied every hour, during your work. Of course you need space in your backup drive, depending how many copies back you want to be able to retrive, but it can be stored in compressed form. There are many backup tools, the simple command line "rsync" is often used, but there are also GUI utils. Disks are quite fragile, I feel the older are more lifelong (I have still working 8GB Samsung) but in last 15 years I quit one (power failure), second brake right after purchasing (probably not handled with care by shop) and third quit for unknown reason (maybe temperature). It happens.

As your drive still spining, there are hope that your data is not yet lost. Check that mount "/dev/sda3" and if you get access to it, you can copy data from there to another drive.

Before chrooting mount your "/dev/sda3" to "/mnt/root" and after that "/dev/sda1" to "/mnt/root/boot" directory. Then you can "chroot /mnt/root" and install packages like "widget" wrote. But there is probably broken filesystem like "TobiSGD" said, so just format it (it must be unmounted) and then reinstall "grub" and "linux" packages. But first make copy of your "/mnt/root/home".

Last edited by eSelix; 08-20-2013 at 03:59 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Speeding up LiveDVD boot, is it possible to get a list of files access on boot? MikeyCarter Linux - Software 1 11-17-2009 02:38 AM
Files are vanished in OEL 5.0 masatheesh Red Hat 8 12-03-2008 05:31 AM
how to recover Suse 11.0 /boot files if Ubuntu's grub lost them & can't boot to suse streams &dragonflies SUSE / openSUSE 6 10-18-2008 08:17 PM
cd drive vanished / mdr boot is corupted / error 21 / help please! drjykellmrhyde Linux - Newbie 1 03-06-2008 08:13 AM
Boot Loader Vanished kurt165749 Linux - Software 7 05-01-2004 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration