Author Topic: (SOLVED) Got "Error 21" message when in GRUB  (Read 2239 times)

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #15 on: September 06, 2012, 07:52:19 PM »

I think I have messed up!  I assumed the 8.4G Media was the memory stick, because it was an 8G stick.  But, the fact is, the 8.4G Media is hdb1.  I now have two more questions!

1.  I tried to copy my files to the 8.4G Media (hdb1), thinking it was the memory stick, and now hdb1 is full.  Is there any way I can get back to where I started? (Probably not.)  It doesn't appear that my files have been lost, but I don't know what to delete from hdb1 to get some memory back on hdb1.  Any suggestions?

2.  Since I got the WARNING!!!! that /dev/hdb1 is mounted and I shouldn't run e2fsck on a mounted filesystem, do I unmount /dev/hdb1?  That won't work, will it?  And why is it telling me not to run e2fsck when I ran fsck?

Thanks,
Batzilla

Rule 1. Don't panic!

Rule 2. Analyze your situation. Were you running as root when you copied the files to /dev/hdb1? If not, and the automount mounted the partition as user writable, all the copied files should have guest as the owner, assuming the liveCD was an original release. You should be able to check that. Find some of the copied files and see who actually owns them. Did you put them all into a single directory? How did you do the actual copying?

When you run fsck, generically, it checks the filesystem then chooses the correct filesystem checker to actually use. In the case of an ext filesystem, the actual application used to check the filesystem is e2fsck.

Back to the copied files, they should be removable, once located, and the system should be recoverable, unless it was corrupted beyond repair, which is quite rare, unless the hard drive is actually failing. The main thing is to focus, and be very deliberate about what you are doing. When in doubt, check first before acting.

From a terminal, su to root, then enter the following;

[root@localhost ~]# ls -l /media/hdb1                 <Enter>

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #16 on: September 06, 2012, 08:34:04 PM »
I'm afraid I was running as root when I copied the files.  Under "system:/media/hdb6" which is the "307MB Media" partition. (this is the very largest partition on the HD and it's where my personal files are located).  If I were in my installed OS, it would be /home/buck.  To copy the files, in Konqueror, under the folder "Storage Media", I right clicked on "307G media", which is "system:/media/hdb6" and copied the two folders to "8.4G Media" which is hdb1.  The two folders are "buck" and "lost+found".  "Buck" is where my personal files are and "lost+found" is empty.  I think I have figured out which files or folders are duplicated.

When I ran [root@localhost ~]# ls -l /media/hdb1, here is what I got:

[root@localhost ~]# ls -l /media/hdb1
ls: /media/hdb1: No such file or directory

BTW, how do I find out who owns the copied files?

Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #17 on: September 06, 2012, 08:50:52 PM »
I'm afraid I was running as root when I copied the files.  Under "system:/media/hdb6" which is the "307MB Media" partition. (this is the very largest partition on the HD and it's where my personal files are located).  If I were in my installed OS, it would be /home/buck.  To copy the files, in Konqueror, under the folder "Storage Media", I right clicked on "307G media", which is "system:/media/hdb6" and copied the two folders to "8.4G Media" which is hdb1.  The two folders are "buck" and "lost+found".  "Buck" is where my personal files are and "lost+found" is empty.  I think I have figured out which files or folders are duplicated.

When I ran [root@localhost ~]# ls -l /media/hdb1, here is what I got:

[root@localhost ~]# ls -l /media/hdb1
ls: /media/hdb1: No such file or directory

BTW, how do I find out who owns the copied files?



Using the ls -l command.

[root@fatman ~]# ls -l /home
total 12
drwxr-xr-x  2 root   root   4096 Jun  8  2011 mysql/
drwxr-xr-x  5 root   root   4096 Sep  5 11:18 partimag/
drwxr-xr-x 96 polack polack 4096 Sep  6 21:43 polack/

Try these commands, in this order;

[root@localhost ~]# umount -a                     <Enter>

You should get a message about the / partition being busy, it's expected.

[root@localhost ~]# mkdir /here                                 <Enter>

[root@localhost ~]# mount /dev/hdb1 /here                                <Enter>

[root@localhost ~]# ls -l /here                                  <Enter>

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #18 on: September 07, 2012, 06:19:46 AM »
[root@localhost ~]# umount -a
umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
[root@localhost ~]# mkdir /here
[root@localhost ~]# mount /dev/hdb1 /here
[root@localhost ~]# ls -l /here
total 280
drwxr-xr-x   2 root root   4096 Sep  4 21:01 backup/
drwxr-xr-x   2 root root   4096 Jun 15  2010 bin/
drwxr-xr-x   3 root root   4096 Sep  2 20:37 boot/
drwxr-xr-x  56 root root   4096 Sep  4 21:00 buck/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Desktop/
drwxr-xr-x  24 root root 135168 Jun 15  2010 dev/
drwxr-xr-x   7 root root   4096 Sep  4 21:01 Documents/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Downloads/
drwxr-xr-x 119 root root  12288 Sep  2 20:38 etc/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 GnuCash_GCBC/
drwxr-xr-x   4 root root   4096 Sep  4 20:58 hdb6/
drwxr-xr-x   2 root root   4096 Jun 15  2010 home/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 House/
drwxr-xr-x   2 root root   4096 Jun 15  2010 initrd/
drwxr-xr-x  17 root root   4096 Jun 15  2010 lib/
drwx------   2 root root  16384 Jun 15  2010 lost+found/
drwxrwxr-x   2 root root   4096 Sep  2 20:37 media/
drwxr-xr-x   3 root root   4096 Sep  4 21:01 Miscellaneous/
drwxr-xr-x   2 root root   4096 Jun 15  2010 mnt/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Movies/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Music/
drwxr-xr-x   8 root root   4096 Jun 15  2010 opt/
drwxr-xr-x  18 root root   4096 Sep  4 21:01 Pictures/
drwxr-xr-x   2 root root   4096 Jun 15  2010 proc/
drwxr-x---  35 root root   4096 Sep  3 16:18 root/
drwxr-xr-x   2 root root  12288 Jun 15  2010 sbin/
drwxr-xr-x   2 root root   4096 Jun 15  2010 sys/
drwxrwxrwt  12 root root   4096 Sep  4 13:31 tmp/
drwxr-xr-x  13 root root   4096 Jul 14  2009 usr/
drwxr-xr-x  15 root root   4096 Jun 12  2010 var/
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ls -l /home
lrwxrwxrwx 1 root root 11 Sep  4 12:52 /home -> /union/home/
[root@localhost ~]#         
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #19 on: September 07, 2012, 09:07:47 AM »
[root@localhost ~]# umount -a
umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
[root@localhost ~]# mkdir /here
[root@localhost ~]# mount /dev/hdb1 /here
[root@localhost ~]# ls -l /here
total 280
drwxr-xr-x   2 root root   4096 Sep  4 21:01 backup/
drwxr-xr-x   2 root root   4096 Jun 15  2010 bin/
drwxr-xr-x   3 root root   4096 Sep  2 20:37 boot/
drwxr-xr-x  56 root root   4096 Sep  4 21:00 buck/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Desktop/
drwxr-xr-x  24 root root 135168 Jun 15  2010 dev/
drwxr-xr-x   7 root root   4096 Sep  4 21:01 Documents/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Downloads/
drwxr-xr-x 119 root root  12288 Sep  2 20:38 etc/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 GnuCash_GCBC/
drwxr-xr-x   4 root root   4096 Sep  4 20:58 hdb6/
drwxr-xr-x   2 root root   4096 Jun 15  2010 home/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 House/
drwxr-xr-x   2 root root   4096 Jun 15  2010 initrd/
drwxr-xr-x  17 root root   4096 Jun 15  2010 lib/
drwx------   2 root root  16384 Jun 15  2010 lost+found/
drwxrwxr-x   2 root root   4096 Sep  2 20:37 media/
drwxr-xr-x   3 root root   4096 Sep  4 21:01 Miscellaneous/
drwxr-xr-x   2 root root   4096 Jun 15  2010 mnt/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Movies/
drwxr-xr-x   2 root root   4096 Sep  4 21:01 Music/
drwxr-xr-x   8 root root   4096 Jun 15  2010 opt/
drwxr-xr-x  18 root root   4096 Sep  4 21:01 Pictures/
drwxr-xr-x   2 root root   4096 Jun 15  2010 proc/
drwxr-x---  35 root root   4096 Sep  3 16:18 root/
drwxr-xr-x   2 root root  12288 Jun 15  2010 sbin/
drwxr-xr-x   2 root root   4096 Jun 15  2010 sys/
drwxrwxrwt  12 root root   4096 Sep  4 13:31 tmp/
drwxr-xr-x  13 root root   4096 Jul 14  2009 usr/
drwxr-xr-x  15 root root   4096 Jun 12  2010 var/
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ls -l /home
lrwxrwxrwx 1 root root 11 Sep  4 12:52 /home -> /union/home/
[root@localhost ~]#         

If you want to list /home on the installed / partition the command would be;

[root@localhost ~]# ls -l /here/home                       <Enter>

If you normally use a separate partition for /home, the directory should now appear empty.

You said you copied the buck directory, (above, in blue) so note the timestamp of Sep  4 21:00. Would that not be a clue as to which other directories were copied to the / partition? Not knowing if you have added any special directories as mount points in /, (most people don't... I do) I'm guessing that's the tell as to what can be deleted. Only you know for sure.

I've marked in red the timestamps of the suspicious directories (marked in blue) that appear to come from /home/buck when your system is mounted normally, or indicate the names of the attempted backups.  Check those, and if I'm right, they can be deleted to regain the space to make the / partition usable again.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #20 on: September 07, 2012, 07:57:04 PM »
I think I messed up?!  I'm logged on as root and I ran the cat command on my mounted USB stick, forgetting that it will give you the contents of a text file.  All kinds of strange characters have been scrolling down my screen for about an hour now.  I thought it would get finished some time, but maybe not.  Is there a way I can stop this?  Can I simply close the session?  I don't want to leave this running all night.

Thanks,
Batzilla
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #21 on: September 07, 2012, 10:26:41 PM »
I think I messed up?!  I'm logged on as root and I ran the cat command on my mounted USB stick, forgetting that it will give you the contents of a text file.  All kinds of strange characters have been scrolling down my screen for about an hour now.  I thought it would get finished some time, but maybe not.  Is there a way I can stop this?  Can I simply close the session?  I don't want to leave this running all night.

Thanks,
Batzilla

Ctrl+C will stop the running process. Why were you running cat? What were you trying to accomplish?  ???
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #22 on: September 08, 2012, 07:21:46 AM »
I was going to check the contents of the memory stick to see what was on it, since I had tried to back up my files a while back.  I thought that, if I could see what was on the memory stick, I would better know what I could and could not delete from /dev/hdb1.  I couldn't find it in the file system to check it that way, even though PCC told me it was mounted as /dev/sda.

I feel like this thread has gotten way off the original question.  Should I continue or start another subject?
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #23 on: September 08, 2012, 08:29:13 AM »
I was going to check the contents of the memory stick to see what was on it, since I had tried to back up my files a while back.  I thought that, if I could see what was on the memory stick, I would better know what I could and could not delete from /dev/hdb1.  I couldn't find it in the file system to check it that way, even though PCC told me it was mounted as /dev/sda.

I feel like this thread has gotten way off the original question.  Should I continue or start another subject?

What do you see using the fdisk -l command, as root?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #24 on: September 08, 2012, 10:36:57 AM »
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           4       32098+   6  FAT16
/dev/hda2   *           5        9725    78083932+   7  HPFS/NTFS

Disk /dev/hdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        1019     8185086   83  Linux
/dev/hdb2            1020       38913   304383555    5  Extended
/dev/hdb5            1020        1528     4088511   82  Linux swap / Solaris
/dev/hdb6            1529       38913   300294981   83  Linux

Disk /dev/sda: 8036 MB, 8036285952 bytes
255 heads, 63 sectors/track, 977 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          50      401593+  83  Linux
/dev/sda2              51         977     7446127+  83  Linux
[root@localhost guest]# 
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #25 on: September 08, 2012, 12:26:17 PM »
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           4       32098+   6  FAT16
/dev/hda2   *           5        9725    78083932+   7  HPFS/NTFS

Disk /dev/hdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        1019     8185086   83  Linux
/dev/hdb2            1020       38913   304383555    5  Extended
/dev/hdb5            1020        1528     4088511   82  Linux swap / Solaris
/dev/hdb6            1529       38913   300294981   83  Linux

Disk /dev/sda: 8036 MB, 8036285952 bytes
255 heads, 63 sectors/track, 977 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          50      401593+  83  Linux
/dev/sda2              51         977     7446127+  83  Linux
[root@localhost guest]# 

So you have two partitions on the USB stick. Mount /dev/sda2 and see what's on it.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #26 on: September 08, 2012, 12:49:21 PM »
[root@localhost guest]# fdisk -l /dev/sda2

Disk /dev/sda2: 7624 MB, 7624834560 bytes
255 heads, 63 sectors/track, 927 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sda2 doesn't contain a valid partition table
[root@localhost guest]#

« Last Edit: September 08, 2012, 12:52:04 PM by batzilla »
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #27 on: September 08, 2012, 01:25:20 PM »
[root@localhost guest]# fdisk -l /dev/sda2

Disk /dev/sda2: 7624 MB, 7624834560 bytes
255 heads, 63 sectors/track, 927 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sda2 doesn't contain a valid partition table
[root@localhost guest]#



The words I use have meanings. The meanings should be clear, because we've used them before, in connection with very explicit commands. Lets try again, and this time stay focused, so you learn to associate the requests with certain actions.  ;D ;D

We want to mount the partition. To do that, we use the mount command. We also need a place to mount the partition, which is an empty directory otherwise referred to as a mount point directory. We create the mount point directory with the mkdir command. (make directory)

We previously created the /here mount point directory and mounted /dev/hdb1 on that. Now we need another mount point with a different name. For no particular reason, other than my whim, we'll name the new directory /there because we may yet copy some data from /here to /there.

[root@localhost ~]# mkdir /there                    <Enter>

[root@localhost ~]# mount /dev/sda2 /there                   <Enter>

To check what is on the partition, if anything, we use the ls command. (list) We also use the -l argument to get the long version, showing permissions, and ownership, of each file or directory.

[root@localhost ~]# ls -l /there                     <Enter>

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline batzilla

  • Full Member
  • ***
  • Posts: 95
Re: Got "Error 21" message when in GRUB
« Reply #28 on: September 08, 2012, 01:40:27 PM »
Sorry!  I'm thick-headed.  ;D

[root@localhost guest]# mkdir /there
[root@localhost guest]# mount /dev/sda2 /there
[root@localhost guest]# ls -l /there
total 16
drwx------ 2 root root 16384 Feb 21  2010 lost+found/
[root@localhost guest]#
Batzilla

Dell Dimension 4500
PCLinuxOS 2012.08-KDE
Release 3.2.18-pclos2.bfs
KDE 4.8.3

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11578
  • ----IOFLU----
Re: Got "Error 21" message when in GRUB
« Reply #29 on: September 08, 2012, 02:08:05 PM »
Sorry!  I'm thick-headed.  ;D

[root@localhost guest]# mkdir /there
[root@localhost guest]# mount /dev/sda2 /there
[root@localhost guest]# ls -l /there
total 16
drwx------ 2 root root 16384 Feb 21  2010 lost+found/
[root@localhost guest]#


Just playing with ya, a bit.  ;D

Basically the partition is empty. The lost+found directory is placed there during the creation of the file system for use by root at a later time, as a place to put damaged files during an fsck procedure.

If you still have /dev/hdb1 mounted on /here, you can use the ls -l command to look into the suspect directories, using the form;

[root@localhost guest]# ls -l /here/<directory name>          <Enter>

Replace <directory name> with the actual name of one of the suspect directories. (backup, buck, Desktop, etc.) Repeat as many times as you have suspect directories, to get a complete list of what has been copied there.

If you still have the original data intact, to be used as a source for a proper backup, you can then delete the suspect directories on /dev/hdb1 using either the command line, or opening the Konqueror - Super User Mode file manager, and navigating to the /here directory, then selecting each directory you wish to remove, and choosing Delete from the right click menu. You want to definitely delete the directories, not send them to trash.

You'd probably be more comfortable using the GUI method than the command line, in this case. I would be. ;)
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...