User Tools

Site Tools


linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux [2017/01/21 10:26] felixonmarslinux [2024/05/13 17:38] (current) – [Mount Target System For Chroot] felixonmars
Line 1: Line 1:
 ==== Create a Swap File ==== ==== Create a Swap File ====
 <code> <code>
-SWAPFILE=/swapfile1 +_size=4g 
-dd if=/dev/zero of=$SWAPFILE bs=1024 count=1048576 +_location=/ 
-mkswap $SWAPFILE +fallocate -l $_size $_location/$_size.swap 
-chown root:root $SWAPFILE +chmod 600 $_location/$_size.swap 
-chmod 0600 $SWAPFILE+mkswap $_location/$_size.swap 
 +echo "$_location/$_size.swap none swap defaults 0 0" >> /etc/fstab 
 +swapon -a 
 +</code> 
 + 
 +btrfs: 
 + 
 +<code> 
 +btrfs filesystem mkswapfile -s $_size $_location/$_size.swap
 </code> </code>
  
 ==== Mount Target System For Chroot ==== ==== Mount Target System For Chroot ====
 <code> <code>
-TARGET=/target +_target=/mnt 
-mount /dev/sdxn $TARGET +mount -t proc proc $_target/proc 
-mount -t proc proc $TARGET/proc +mount -t sysfs sys $_target/sys 
-mount -t sysfs sys $TARGET/sys +mount -o bind /dev $_target/dev 
-mount -o bind /dev $TARGET/dev +mount -t devpts pts $_target/dev/pts/ 
-mount -t devpts pts $TARGET/dev/pts/ +chroot $_target 
-chroot $TARGET+</code> 
 + 
 +==== ZSWAP ==== 
 +Configuration: 
 +<code> 
 +grep -r . /sys/module/zswap/parameters/ 
 +</code> 
 +Stats: 
 +<code> 
 +grep -r . /sys/kernel/debug/zswap/
 </code> </code>
  
Line 31: Line 48:
 /var/lock/* /var/lock/*
 /var/run/* /var/run/*
-/var/lib/pacman/*+/var/log/*.gz 
 +/var/log/**/*.gz
 /var/cache/pacman/pkg/* /var/cache/pacman/pkg/*
 +/home/**/.cache/chromium/*
 +/home/**/.ccache/*
 +/home/**/.avfs
 +/home/**/.gvfs
 /lost+found /lost+found
 </code> </code>
Line 76: Line 98:
 </code> </code>
  
-=== Install Zesty Kernel (4.9) on Xenial ===+==== Install Artful Kernel (4.13) on Xenial ====
 <code> <code>
-echo 'deb http://archive.ubuntu.com/ubuntu/ zesty main' >> /etc/apt/sources.list.d/zesty.list +echo 'deb http://archive.ubuntu.com/ubuntu/ artful main' >> /etc/apt/sources.list.d/artful.list 
-echo -e 'Package: *\nPin: release a=zesty\nPin-Priority: 100\n' >> /etc/apt/preferences.d/zesty.pref+echo -e 'Package: *\nPin: release a=artful\nPin-Priority: 100\n' >> /etc/apt/preferences.d/artful.pref
 apt-get update apt-get update
-apt-get install -t zesty linux-image-generic linux-generic linux-headers-generic linux-libc-dev+apt-get install -t artful linux-image-generic linux-generic linux-headers-generic linux-libc-dev
 </code> </code>
  
linux.1484994414.txt.gz · Last modified: 2017/01/21 10:26 by felixonmars