Open main menu

CDOT Wiki β

Changes

User talk:Bossa nesta

1,888 bytes added, 06:22, 14 October 2008
no edit summary
will be extracted the current directory)
$ rpm2cpio wget-1.10.2-78.i586.rpm | cpio -idmv
</pre>
 
======================== SYA710 ========================
 
<pre>
# Create a regular file (filled with zeros) as
the container for file system
 
dd if=/dev/zero of=fakedisk bs=1024 count=10000
 
# associate file "fakedisk" with /dev/loop0
losetup /dev/loop0 fakedisk
 
# Now create a file system in the container:
mkfs -t ext2 /dev/loop0
# Make an ext3 file system in the new partition:
mkfs -t ext3 /dev/sda4
 
# Mount the file system:
mount /dev/loop0 /mnt1
# mount /dev/sda4 into /mnt1
mount /dev/sda4 /mnt1
# Unmount the file system
umount /mnt1
 
# Display partition info
-h, --human-readable in K,M,G form
 
-i, --inodes print inodes instaed of block usage
-T, --print-type print file system type
df -Thi /dev/loop0
 
# Delete the loop device
losetup -d /dev/loop0
 
# Inform the kernel of the change in the partition table
partprobe
 
# Now copy the contents of your /home directory to this
new file system like this:
cp -a /home/* /mnt1
 
# make /dev/sda4 as /home, in /etc/fstab file...
/dev/sda4 /home ext3 defaults 1 3
 
# initialize two unused partitions to LVM.
pvcreate /dev/sda5 /dev/sda6
 
# Create a volume group 'seneca' and put physical volume /dev/sda5 into it.
vgcreate seneca /dev/sda5
 
# label partition /dev/seneca/home as "myhome"
e2label /dev/seneca/home myhome
 
# Verify a partition label
e2label /dev/seneca/home
 
# add physical volumes to a volume group
vgextend seneca /dev/sda6
 
# extend the size of a logical volume
lvextend -L+1G /dev/seneca/home
 
# ext2/ext3 file system resizer
resize2fs /dev/seneca/home
 
# unpack a bz2 file into a directory
tar xvjf linux-2.6.26.tar.bz2
 
# decompress a gz with gzip
gzip -d config.gz
 
# creates initial ramdisk images for preloading modules
mkinitrd -k vmlinuz-2.6.26 -i initrd-2.6.26
 
</pre>