Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
mkdir -p os/rootfs cd os/rootfs #create base file system mkdir dev proc sys tmp bin sudo mknod dev/console c 5 1 #copy buysbox and link all applications cp /usr/bin/busybox bin ./bin/busybox busybox --install ./bin/ #create init script echo '#!/bin/sh mount -t proc proc /proc mount -t sysfs sysfs /sys mount -t devtmpfs udev /dev /bin/sh poweroff -f' > init chmod +x init #create initrd find . | cpio -H newc -o | gzip > ../rootfs.cpio.gz cd ../ #copy kernel from current system cp "$(ls /boot/vmlinuz-*|tail -n1)" linux #run virtual machine qemu-system-x86_64 -enable-kvm -kernel linux -initrd rootfs.cpio.gz #or run it without GUI in current shell qemu-system-x86_64 -enable-kvm -kernel linux -initrd rootfs.cpio.gz -nographic -append 'console=ttyS0'
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)