≡ Menu


Linux: Find Out What Partition a File Belongs To

How do I find out that /users/f/foo/file.txt file belongs to a specific partition? How do I find out on what partition a file exits?
[click to continue…]

Ubuntu: Mount The Drive From Command Line

I'm new to Ubuntu Linux. How do I mount the hard disk drive from command line?
[click to continue…]

CentOS / Redhat: Chroot And Mount Raid Or Actual Hard Disk From Rescue Kernel / CD

Something is wrong with my RHEL networking configuration so I booted using my ISPs remote rescue kernel mode to fix my system. How do I mount and chroot into actual installation to fix the problem? How do I boot from any Live Linux CD and chroot into /dev/sda1 or /dev/md0 to fix the problem or recover the data?
[click to continue…]

HowTo: Reload (re-read) Partition Table In Ubuntu Linux

How do I reload the partition table in Ubuntu Linux without rebooting the systems?
[click to continue…]

FreeBSD Move /usr or /var File System To Another Hard Disk

My current /usr file system was full, so I ended up adding a new disk to my FreeBSD server. I've created a new partition at /dev/ad6s1 (size is 250G). How do I move my /usr file system over to my huge new disk at /dev/ad6s1?
[click to continue…]

Linux: Skip or Bypass a Fsck

Q. I know how to force fsck on the next reboot using /forcefsck file. But how do I skip or bypass a fsck on reboot? How to stop a FSCK from prompting or running automatically when rebooting server.
[click to continue…]

Linux: Recover Corrupted Partition From A Bad Superblock

Q. How can I Recover a bad superblock from a corrupted ext3 partition to get back my data? I'm getting following error:

/dev/sda2: Input/output error
mount: /dev/sda2: can't read superblock

How do I fix this error?
[click to continue…]

Linux Partition Naming Convention ( IDE Drive Mappings )

Q. I am new to Linux and I not able to understand /dev/hdc (is it C: drive?) under Linux. This is quite confusing for a new Linux user like me. What device naming convention followed by Linux? Can you explain it in layman's term?
[click to continue…]

Linux Kernel panic VFS Unable to mount root fs and solution

Q. I am using Linux on HP server and I am getting error that read as follows:
Linux Kernel panic: VFS: Unable to mount root fs

How do I solve this problem?

A. Most modern distributions including Debian uses loadable kernel module for ext3 file system. So to read ext3/ext2 file system kernel must load ext3 kernel module (ext3.ko).

This module is included in an initrd image. If an initrd image is missing or that image does not include suitable kernel modules to access the ext3 filesystem on the partition, an error message (Linux Kernel panic: VFS: Unable to mount root fs) will be displayed to you.

To solve this problem you need to use mkinitrd script that constructs a directory structure that can serve as an initrd root file system.

The instructions for creating initrd images are here on our site.

Linux display information about installed hardware

You need to use command called lsdev. It gathers information about your computer's installed hardware from the interrupts, ioports and dma files in the /proc directory, thus giving you a quick overview of which hardware uses what I/O addresses and what IRQ and DMA channels.

This command is very useful while troubleshooting various hardware conflict problems.

Task display : CPU Information

$ cat /proc/cpuinfo

Task: Display Free and used Memory Information

$ free -m

Task: Display partition information

# fdisk -l

Task: Display file system disk space usage

# df -H
# df -h

Task: Estimate file space usage

# du

Task: List PCI devices

# lspci

Task: List USB devices

# lsusb

Task display : More Information

$ lsdev


Device            DMA   IRQ  I/O Ports
0000:00:1d.0                 d800-d81f
0000:00:1d.1                 d000-d01f
0000:00:1d.2                 d400-d41f
0000:00:1f.0                 4000-407f 4080-40bf
0000:00:1f.1                 f000-f00f
0000:00:1f.3                 5000-501f
0000:00:1f.5                 e000-e0ff e400-e43f
0000:01:05.0                   c000-c0ff
8139too                          c000-c0ff
acpi                      9
bttv0                    22
cascade             4
dma                          0080-008f
dma1                         0000-001f
dma2                         00c0-00df
ehci_hcd:usb4            20
eth0                     18
fpu                          00f0-00ff
GPE0_BLK                       4028-402f
i8042                  1 12
ICH4                     21
ide0                     14  01f0-01f7 03f6-03f6   f000-f007
ide1                     15  0170-0177 0376-0376   f008-f00f
Intel                          e000-e0ff   e400-e43f
keyboard                     0060-006f
parport0                  7  0378-037a
PCI                          0cf8-0cff c000-cfff
pic1                         0020-0021
pic2                         00a0-00a1
PM1a_CNT_BLK                   4004-4005
PM1a_EVT_BLK                   4000-4003
PM_TMR                         4008-400b
rtc                       8  0070-0077
serial                       02f8-02ff 03f8-03ff
timer                     0
timer0                       0040-0043
timer1                       0050-0053
uhci_hcd                       d000-d01f   d400-d41f   d800-d81f
uhci_hcd:usb1            16
uhci_hcd:usb2            19
uhci_hcd:usb3            17
vga+                         03c0-03df

See also: