Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I reformatted my system disk and now the swap partition on /dev/sda2 doesn't mount properly anymore:
root:# swapon -a
swapon: /dev/sda2: read swap header failed: Invalid argument
root:# cat /etc/fstab
# /etc/fstab: static file system information.
# The following is an example. Please see fstab(5) for further details.
# Please refer to mount(1) for a complete description of mount options.
# <file system> <mount point> <type> <options> <dump> <pass>
# dump(8) uses the <dump> field to determine which file systems need
# to be dumped. fsck(8) uses the <pass> column to determine which file
# systems need to be checked--the root file system should have a 1 in
# this field, other file systems a 2, and any file systems that should
# not be checked (such as MS-initrd/mnt or NFS file systems) a 0.
# The Linux partitions
/dev/sda1 / ext3 defaults 0 1
# Shared Windows/Linux partition
#/dev/hda1 /mnt/dos msdos umask=0 0 0
#/dev/hda1 /mnt/win vfat fmask=111,dmask=0,quiet,shortname=mixed,user 0 0
#/dev/hda1 /mnt/win ntfs umask=0 0 0
# Floppy disks
# The 'noauto' option indicates that the file system should not be mounted
# with 'mount -a' 'user' indicates that normal users are allowed to mount
# the file system.
/dev/fd0 /mnt/floppy auto defaults,noauto,user 0 0
#/dev/fd1 /mnt/floppy auto defaults,noauto,user 0 0
# If you have a ls-120 floppy drive, it could be on /dev/hda b c d etc.
#/dev/hdd /mnt/ls120 auto defaults,noauto,user 0 0
# CDROM, CDWRITER, DVD
/dev/cdrom /mnt/cdrom iso9660 defaults,noauto,ro,user 0 0
#/dev/cdwriter /mnt/cdwriter iso9660 defaults,noauto,rw,user 0 0
#/dev/dvd /mnt/dvd auto defaults,noauto,ro,user 0 0
# NFS file systems:
#linux01.gwdg.de:/suse/6.3/i386.de /mnt/nfs nfs defaults 0 0
# proc file system:
proc /proc proc defaults 0 0
# Unix98 devpts filesystem:
none /dev/pts devpts gid=5,mode=666 0 0
# Shared memory filesystem:
tmpfs /dev/shm tmpfs defaults 0 0
# Basic USB filesystem
sysfs /sys sysfs defaults 0 0
usbfs /proc/bus/usb usbfs rw,devmode=0666 0 0
# example of a VFAT USB pendrive
#/dev/sda1 /mnt/pendrive vfat fmask=111,dmask=0,noauto,user,quiet,shortname=m
ixed 0 0
# Swap partitions
# The 'sw' option means auto activating with 'swapon -a'.
/dev/sda2 swap swap defaults 0 0
#Mount sda3 on main drive to /mnt/linux
/dev/sda3 /mnt/linux ext3 defaults,user,exec 0 0
#Mount sdb1 on /mnt/main
/dev/sdb1 /mnt/main ntfs-3g defaults,user,exec 0 0
root:# fdisk -l /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk does
't support GPT. Use GNU Parted.
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 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: 0x5560f0fb
Device Boot Start End Blocks Id System
/dev/sda1 2048 50000000 24998976+ 83 Linux
/dev/sda2 50000001 50996030 498015 82 Linux swap
/dev/sda3 50996031 156301487 52652728+ 83 Linux