≡ Menu

reboot command

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…]

Red Hat / CentOS: Swap / Change Ethernet Aliases

Q. My Ethernet aliases are randomly switched and they are bound to the wrong interface. My eth0 became eth1 and eth1 become eth0. This is causing all sort of trouble for services and firewall configurations. How do I swap back and make sure Ethernet aliases works correctly under CentOS Linux server?
[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…]

Q. I'm trying to recompile my kernel by tying the following commands:

cd /usr/src/sys/i386/conf
cp GENERIC NEWKEN
vi NEWKEN
cd /usr/src
make buildkernel KERNCONF=NEWKEN

But I'm bumped with an error that read as follows:

make: don't know how to make buildkernel. Stop Error and Solution

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

Reboot Linux System Command

How do I reboot my Linux based system? How do I reboot a remote Linux system or server using command line?
[click to continue…]

Reboot UNIX System Command

Q. How do I reboot a UNIX system computer?
[click to continue…]

Q. Can I run fsck or e2fsck command when Linux file system is mounted? Do you advice to run fsck on a live file system? I am using Cent OS.

A. No. Do not run fsck on a live or mounted file system. fsck is used to check and optionally repair one or more Linux file systems. Running fsck on a mounted filesystem can usually result in disk / data corruption. So please do not do it. You have two choices
(a) Take down system to single user mode and unmout system

(b) Boot from the installation CD into rescue mode

(a) Take down system to single user mode and unmout system

Following are steps :
=> Use init (process control initialization ) command to change runlevel 1 (singe user mode)
=> Use umount command to unmount /home file system
=> Run fsck using fsck command

Let us say you would like to run fsck on /home (/dev/sda3):

# init 1
# umount /home
# umount /dev/sda

# fsck /homeOR
# fsck /dev/sda3OR
# e2fsck -y /dev/sda3

(b) Boot from the installation CD into rescue mode

If you are using Cent OS/Fedora Core/RHEL linux, boot from first CD and at boot prompt type linux rescue nomount:
boot: linux rescue nomount

Now make new node for disk and partition 3:
# mknod /dev/sda
# mknod /dev/sda3
# fsck /dev/sda3

OR
# e2fsck -y /dev/sda3

Don't forget to reboot the system:
# exit;exit
# reboot