特殊:Badtitle/NS100:UserModeLinux
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/UserModeLinux }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/af | • {{#if: UbuntuHelp:UserModeLinux|Afrikaans| [[::UserModeLinux/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ar | • {{#if: UbuntuHelp:UserModeLinux|العربية| [[::UserModeLinux/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/az | • {{#if: UbuntuHelp:UserModeLinux|azərbaycanca| [[::UserModeLinux/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/bcc | • {{#if: UbuntuHelp:UserModeLinux|جهلسری بلوچی| [[::UserModeLinux/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/bg | • {{#if: UbuntuHelp:UserModeLinux|български| [[::UserModeLinux/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/br | • {{#if: UbuntuHelp:UserModeLinux|brezhoneg| [[::UserModeLinux/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ca | • {{#if: UbuntuHelp:UserModeLinux|català| [[::UserModeLinux/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/cs | • {{#if: UbuntuHelp:UserModeLinux|čeština| [[::UserModeLinux/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/de | • {{#if: UbuntuHelp:UserModeLinux|Deutsch| [[::UserModeLinux/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/el | • {{#if: UbuntuHelp:UserModeLinux|Ελληνικά| [[::UserModeLinux/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/es | • {{#if: UbuntuHelp:UserModeLinux|español| [[::UserModeLinux/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/fa | • {{#if: UbuntuHelp:UserModeLinux|فارسی| [[::UserModeLinux/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/fi | • {{#if: UbuntuHelp:UserModeLinux|suomi| [[::UserModeLinux/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/fr | • {{#if: UbuntuHelp:UserModeLinux|français| [[::UserModeLinux/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/gu | • {{#if: UbuntuHelp:UserModeLinux|ગુજરાતી| [[::UserModeLinux/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/he | • {{#if: UbuntuHelp:UserModeLinux|עברית| [[::UserModeLinux/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/hu | • {{#if: UbuntuHelp:UserModeLinux|magyar| [[::UserModeLinux/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/id | • {{#if: UbuntuHelp:UserModeLinux|Bahasa Indonesia| [[::UserModeLinux/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/it | • {{#if: UbuntuHelp:UserModeLinux|italiano| [[::UserModeLinux/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ja | • {{#if: UbuntuHelp:UserModeLinux|日本語| [[::UserModeLinux/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ko | • {{#if: UbuntuHelp:UserModeLinux|한국어| [[::UserModeLinux/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ksh | • {{#if: UbuntuHelp:UserModeLinux|Ripoarisch| [[::UserModeLinux/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/mr | • {{#if: UbuntuHelp:UserModeLinux|मराठी| [[::UserModeLinux/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ms | • {{#if: UbuntuHelp:UserModeLinux|Bahasa Melayu| [[::UserModeLinux/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/nl | • {{#if: UbuntuHelp:UserModeLinux|Nederlands| [[::UserModeLinux/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/no | • {{#if: UbuntuHelp:UserModeLinux|norsk| [[::UserModeLinux/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/oc | • {{#if: UbuntuHelp:UserModeLinux|occitan| [[::UserModeLinux/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/pl | • {{#if: UbuntuHelp:UserModeLinux|polski| [[::UserModeLinux/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/pt | • {{#if: UbuntuHelp:UserModeLinux|português| [[::UserModeLinux/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ro | • {{#if: UbuntuHelp:UserModeLinux|română| [[::UserModeLinux/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/ru | • {{#if: UbuntuHelp:UserModeLinux|русский| [[::UserModeLinux/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/si | • {{#if: UbuntuHelp:UserModeLinux|සිංහල| [[::UserModeLinux/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/sq | • {{#if: UbuntuHelp:UserModeLinux|shqip| [[::UserModeLinux/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/sr | • {{#if: UbuntuHelp:UserModeLinux|српски / srpski| [[::UserModeLinux/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/sv | • {{#if: UbuntuHelp:UserModeLinux|svenska| [[::UserModeLinux/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/th | • {{#if: UbuntuHelp:UserModeLinux|ไทย| [[::UserModeLinux/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/tr | • {{#if: UbuntuHelp:UserModeLinux|Türkçe| [[::UserModeLinux/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/vi | • {{#if: UbuntuHelp:UserModeLinux|Tiếng Việt| [[::UserModeLinux/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/yue | • {{#if: UbuntuHelp:UserModeLinux|粵語| [[::UserModeLinux/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/zh | • {{#if: UbuntuHelp:UserModeLinux|中文| [[::UserModeLinux/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/zh-hans | • {{#if: UbuntuHelp:UserModeLinux|中文(简体)| [[::UserModeLinux/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UserModeLinux | UbuntuHelp:UserModeLinux | {{#if: | :}}UserModeLinux}}/zh-hant | • {{#if: UbuntuHelp:UserModeLinux|中文(繁體)| [[::UserModeLinux/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:UserModeLinux|:UserModeLinux|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UserModeLinux/zh | | {{#ifexist: UserModeLinux/zh | | {{#ifeq: {{#titleparts:UserModeLinux|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UserModeLinux|1|-1|}} | zh | | }}
<<Include(Tag/ContentCleanup)>> <<Include(Tag/NeedsExpansion)>>
Getting Started
This page will help you get started using User-Mode Linux with Ubuntu. Guide is created for Hardy LTS, but will most likely work with other releases: The first thing we need is to install the uml kernel and utilities we will need.
sudo apt-get install user-mode-linux uml-utilities bridge-utils
The next step is getting us a nice ubuntu hardy filesystem:
dd if=/dev/zero of=uml-root-hardy bs=4096 seek=1M count=1 mkfs.xfs uml-root-hardy sudo mount -o loop uml-root-hardy /mnt sudo apt-get install debootstrap sudo debootstrap --arch amd64 hardy /mnt http://us.archive.ubuntu.com/ubuntu sudo echo "/dev/ubd0 / xfs defaults 0 1" > /mnt/etc/fstab sudo echo "proc / proc proc defaults 0 0" >> /mnt/etc/fstab sudo mknod --mode=660 /mnt/dev/ubd0 b 98 0 sudo chown root:disk /mnt/dev/ubd0 sudo echo "127.0.0.1 localhost" /etc/hosts sudo echo "auto lo \ iface lo inet loopback \ auto eth0 \ iface eth0 inet dhcp" > /mnt/etc/network/interfaces sudo echo "tty0" >> /mnt/etc/securetty sudo echo "ttys/0" >> /mnt/etc/securetty sudo rm /mnt/etc/event.d/tty2 sudo rm /mnt/etc/event.d/tty3 sudo rm /mnt/etc/event.d/tty4 sudo rm /mnt/etc/event.d/tty5 sudo rm /mnt/etc/event.d/tty6 sudo rm /mnt/etc/udev/rules.d/75-persistent-net-generator.rules
Basically what we've done is created an empty filesystem, mounted it, and made some changes that we want done on all our vm's. We should be ready to run our new vm now:
linux ubd0=uml-root-hardy.cow1,uml-root-hardy umid=uml1
User-Mode Linux is another virtualisation technique for running VirtualMachines under GNU/Linux. See the User-Mode Linux project page for more information.