Linkshare rotating banner
Showing posts with label guide. Show all posts
Showing posts with label guide. Show all posts

Wednesday, September 26, 2012

Using UnionfsFuse on Debian/Ubuntu Linux

Unionfs-fuse is a user-space implementation of unionfs that makes it possible to run Linux over a read-only medium, such as CD-ROM. Unionfs-fuse is a convenient alternative to kernel implementations (unionfs, aufs and overlayfs), so users don't have to patch the kernel in order to try unionfs. There are many possible uses of unionfs:




  • Create a live CD
  • Run Linux from a read-only filesystem image, such as a squashfs file
  • Freeze an existing Linux system and save all changes in the memory


Unionfs achieves all this by merging a read-only filesystem and a writeable filesystem into a single virtual filesystem and mount it at a certain mount point. Let's try and apply unionfs-fuse to the third situation above. Basically, we need to create an initramfs file containing unionfs-fuse and a custom init script. The basic procedure is like this:






  1. Load kernel drivers necessary to access the underlying storage device
  2. Mount the read-only filesystem image at /opt
  3. Mount tmpfs at /opt/tmp and create a directory /opt/tmp/.change
  4. Use unionfs-fuse to merge the two and mount it at /mnt
  5. Use chroot and start /sbin/init to boot the new unionfs filesystem


To carry about the above steps, an init script might look like this:



#!/bin/dash
# Use the small but functional dash to process this script

# Mount /proc, /sys, /dev and /dev/pts just in case
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
mkdir -m 755 /dev/pts
mount -t devpts -o gid=5,mode=620 none /dev/pts

# Write commands here to load modules necessary to access a hard drive
modprobe pata_via
modprobe sd_mod

# Mount the Linux filesystem read-only at /opt
mount -r /dev/sda6 /opt

# Mount tmpfs at /opt/tmp
mount -t tmpfs none /opt/tmp
mkdir /opt/tmp/.change

# Create a unionfs mount at /mnt
modprobe fuse
unionfs-fuse -o allow_other,use_ino,suid,dev,nonempty,kernel_cache \
-o cow,chroot=/opt,max_files=32768 /tmp/.change=RW:/=RO /mnt

# Make sure that init exists and is executable
if [ -x /mnt/sbin/init ]; then
mount --move /dev /mnt/dev
mount --move /proc /mnt/proc
mount --move /sys /mnt/sys

# Start init from the root filesystem with runlevel 5.
exec chroot /mnt /sbin/init 5
fi


The computer will boot into a virtual unionfs, consisting of writable tmpfs on top of read-only root filesystem. Make sure to modify /etc/rc.local so that it contains the following snippet of code.



for i in `ps ax | grep unionfs | grep -v grep | awk '{print $1}'`; do
echo $i > /var/run/sendsigs.omit.d/unionfs.$i;
done


This prevents Linux from killing unionfs-fuse during shutdown so the system will properly shut down.



Related Posts



Wednesday, March 23, 2011

Hacker's Guide To Installing Windows 7

Many people want to try the new Windows 7, but they're not too sure if Windows 7 is worth it. After all, it doesn't make sense to buy a new computer to try Windows 7 and then find out it's another lame bloatware. This guide will help an average joe to download, install and activate Windows 7 with freely available tools.



Hardware Requirements of Windows 7


First, you need to decide if your computer is capable of running Windows 7. According to Microsoft, Windows 7 has the following hardware requirements:



  • 1 GHz or faster 32-bit or 64-bit processor
  • 1 GB RAM (32-bit) or 2 GB RAM (64-bit)
  • 16 GB available hard disk space (32-bit) or 20 GB (64-bit)
  • DVD-ROM drive or DVD burner
  • DirectX 9 graphics card with WDDM 1.0 or better driver


That means Windows 7 can run on most computers available. You may have to buy additional memory or a new video card to be able to run Windows 7. See the Windows 7 Compatibility site.



Next, decide which edition of Windows 7 you want to install on your computer. There are many editions of Windows 7, for example, Home Premium, Professional, Enterprise and Ultimate. For most people, Windows 7 Home Premium is good enough.



Windows 7 Direct Downloads and Bittorrents



It is recommended that you use aria2, Halogenware Retriever or Free Download Manager to download Windows 7 so you can resume a download in the event of connection problems. On the Web, you can download DVD images of Windows 7 from the following locations:



  • Windows 7 Home Premium SP1 (x86 English) X17-24208.iso

    MD5: c5bb99b2f1a9e7a5b4fbc6e3eff70882

    SHA1: 22df3e5a80f8dbf014c2776a01b1cd9f24d83233

    CRC32: 9c5dc931
  • Windows 7 Home Premium SP1 (x64 English) X17-24209.iso

    MD5: 971843a457b6e0db0af61258cbe7256a

    SHA1: b4821f46a171708f5f8f8a0ef48fc16529437961

    CRC32: d236fd70
  • Windows 7 Professional SP1 (x86 English) X17-24280.iso

    MD5: befd4f1e00ec8da2effbd789f4e66fbf

    SHA1: 917a542b0541054bb9c2a06a11a46aed6943856b

    CRC32: 20078d8d
  • Windows 7 Professional SP1 (x64 English) X17-24281.iso

    MD5: 338f3245d68527db47b8a44e55317d0a

    SHA1: 5ed2584110e03f498db4458ba9fafd5a7ef602ed

    CRC32: 74f3cb73
  • Windows 7 Ultimate SP1 (x86 English) X17-24394.iso

    CRC32: C2966895

    MD5: 24F3A45D43D7C532AA3126CC094C61BD

    SHA1 : 92c1ada4ff09c76ec2f1974940624cab7f822f62

    SHA2: BBB5E0BAF3659F6DEC96B50381CBB05C09F066675EE639324B728215D5D47C43
  • Windows 7 Ultimate SP1 (x64 English) X17-24395.iso

    CRC32: 8589EE18

    MD5: 56A26636EC667799F5A7F42F142C772D

    SHA1: 1693b6cb50b90d96fc3c04e4329604feba88cd51

    SHA2: 9A2F3972FBBBB4974255CCCC26CDA9B1A75D9D0179867D6111162AC33F0CB693
  • Windows 7 Home Premium (x86 English) X15-65732.iso

    SHA1: CC9D8220B2179E784D85BF1EA98D2EE2190D534F

    ISO/CRC: 5DF6DBA0
  • Windows 7 Home Premium (x64 English) X15-65733.iso

    SHA1: 336779EA6B65F63E11A609B4D021439C47AB315B

    ISO/CRC: 56D954E4
  • Windows 7 Professional (x86 English) X15-65804.iso

    SHA1: 697FA06554502FB21D30275273B25747299C020D

    ISO/CRC: 578725D1
  • Windows 7 Professional (x64 English) X15-65805.iso

    SHA1: 50127304441A793EE51B3F501289F6599A559E9F

    ISO/CRC: 502C42C1
  • Windows-7-SP1-EN-MSDN-TechNet.torrent


I like using aria2 for download. Get my aria2 win32 build from here. To use aria2c to download Windows 7 Home Premium, open the Command Prompt and type the following command.



aria2c --file-allocation=prealloc http://msft-dnl.digitalrivercontent.net/msvista/pub/X15-65732/X15-65732.iso


To stop the download, press Ctrl+C twice. Later, you can resume download with the command:



aria2c -c http://msft-dnl.digitalrivercontent.net/msvista/pub/X15-65732/X15-65732.iso


After the download has finished, verify the checksums of the download with md5deep or HashCheck shell extension.

This is optional. If you want to create a single All-in-One DVD that can be used to install Home Basic, Home Premium, Professional and Ultimate edition, download and run eicfg_remover. This tool removes ei.cfg from the ISO file.

Then, burn the image to a blank DVD. You need to have a DVD burner and a blank DVD, of course. For free DVD-burning software, you can get ImgBurn, InfraRecorder or CDBurnerXP.



About This Blog

KBlog logo This blog seeks to share useful information on hottest movies available on the Internet. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger