User:Egberts/sandbox

From Gentoo Wiki
Jump to:navigation Jump to:search

Sometimes when I press Enter, nothing happens.

I forget that amd64 is often used instead of x86_64.

   File:File.jpg to use the full version of the file
File:File.png
alt text

to use a 200 pixel wide rendition in a box in the left margin with 'alt text' as description

   Media:File.ogg for directly linking to the file without displaying the file

To access the guest disk from the host (and e.g. chroot into the guest), use a "Network Block Device":

root # modprobe nbd max_part=16
root # qemu-nbd -c /dev/nbd0 Gentoo-VM.img
root # mount /dev/nbd0p4 /mnt/gentoo

Make any changes required and clean up:

root # umount /mnt/gentoo
root # qemu-nbd -d /dev/nbd0

Assuming that there exists a bridge called br0 on the machine, the following configuration exposes the image to the LAN.

FILE start_Gentoo_VM.sh
#!/bin/bash
exec qemu-system-x86_64 -enable-kvm \
        -cpu host \
        -drive file=Gentoo-VM.img,if=virtio \
        -netdev bridge,id=net0,br=br0 \
        -device virtio-net-pci,netdev=net0 \
        -device virtio-rng-pci \
        -m 512M \
        -smp 2 \
        -nographic \
        -name "Gentoo VM" \
        $@
root #./start_Gentoo_VM.sh -boot d -cdrom install-amd64-minimal-20120621.iso

Boxen Section

FILE {{{filename}}}FileBox example
Some text/code.
FILE {{{filename}}}FileBox example2
Some text/code.
Warning

This is some warning given here

Tip

some tip given.

Note

some note content goes here.

Important

some important content goes here.

Heading

Text


user $grub-install /dev/vda
CODE CodeBox example with title
#!/bin/bash echo "Hello, world!"

In GRUB the parameters can be added to the variable GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.

CODE Kernel command-line
linux root=/dev/vda3 nomodule rw

Then run:

root #grub-mkconfig -o /boot/grub/grub.cfg
command output
  this
    that
KERNEL KernelBox with title example
Some long kernel options ...
user $ls -l /sys
 total 0 drwxr-xr-x 2 root root 0 Jun 28 14:42 block drwxr-xr-x 30 root root 0 May 31 13:51 bus drwxr-xr-x 68 root root 0 May 31 13:51 class drwxr-xr-x 4 root root 0 May 31 13:51 dev drwxr-xr-x 23 root root 0 May 31 13:51 devices drwxr-xr-x 6 root root 0 May 31 13:51 firmware drwxr-xr-x 14 root root 0 May 31 13:51 fs drwxr-xr-x 11 root root 0 May 31 13:51 kernel drwxr-xr-x 281 root root 0 May 31 13:51 module drwxr-xr-x 2 root root 0 Jun 28 14:42 power 
ls -l /
total 4
drwxr-xr-x 1 root root  970 Oct 26 22:29 bin
drwxr-xr-x 1 root root   10 Oct 26 18:29 boot
drwxr-xr-x 1 root root 1686 Oct 26 18:31 dev
drwxr-xr-x 1 root root 1276 Oct 26 22:32 etc
drwxr-xr-x 1 root root   10 Oct 26 18:29 home
lrwxrwxrwx 1 root root    5 Oct 26 21:09 lib -> lib64
drwxr-xr-x 1 root root 1366 Oct 26 21:09 lib32
drwxr-xr-x 1 root root 3490 Oct 26 22:29 lib64
drwxr-xr-x 1 root root   10 Oct 26 18:29 media
drwxr-xr-x 1 root root   10 Oct 26 18:29 mnt
drwxr-xr-x 1 root root   10 Oct 26 18:29 opt
drwxr-xr-x 1 root root    0 Oct 26 18:16 proc
drwx------ 1 root root   10 Oct 26 18:29 root
drwxr-xr-x 1 root root   22 Oct 26 22:28 run
drwxr-xr-x 1 root root 1914 Oct 26 22:32 sbin
drwxr-xr-x 1 root root   10 Oct 26 18:29 sys
drwxrwxrwt 1 root root   10 Oct 26 22:32 tmp
drwxr-xr-x 1 root root  138 Oct 26 22:32 usr
drwxr-xr-x 1 root root   66 Oct 26 18:29 var
root #ls -l /sys
 total 0 drwxr-xr-x 2 root root 0 Jun 28 14:42 block drwxr-xr-x 30 root root 0 May 31 13:51 bus drwxr-xr-x 68 root root 0 May 31 13:51 class drwxr-xr-x 4 root root 0 May 31 13:51 dev drwxr-xr-x 23 root root 0 May 31 13:51 devices drwxr-xr-x 6 root root 0 May 31 13:51 firmware drwxr-xr-x 14 root root 0 May 31 13:51 fs drwxr-xr-x 11 root root 0 May 31 13:51 kernel drwxr-xr-x 281 root root 0 May 31 13:51 module drwxr-xr-x 2 root root 0 Jun 28 14:42 power 
CODE CodeBox example with title
#!/bin/bash echo "Hello, world!"

This sentence offers a hyperlink that will take you back to the Boxen section.

See also
Text about associated documentation.

The Main Page — Larry the cow beckons you to explore the Gentoo wiki!

/etc/fstab

KERNEL Enable tmpfs support
File systems  --->
     Pseudo filesystems  --->
          [*] Tmpfs virtual memory file system support (former shm fs)
          [ ] Optional drivers