特殊:Badtitle/NS100:UsingUUID:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第32行: | 第32行: | ||
</nowiki></pre> | </nowiki></pre> | ||
* For <code><nowiki>/etc/initramfs-tools/conf.d/resume</nowiki></code>, there is no automatic procedure: | * For <code><nowiki>/etc/initramfs-tools/conf.d/resume</nowiki></code>, there is no automatic procedure: | ||
* Verify that <code><nowiki>RESUME=</nowiki></code> matches your <code><nowiki>swap</nowiki></code> line in <code><nowiki>/etc/fstab</nowiki></code> | |||
* After any adjustment, run <code><nowiki>sudo update-initramfs -u</nowiki></code> | |||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年12月6日 (四) 15:48的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/UsingUUID }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/af | • {{#if: UbuntuHelp:UsingUUID|Afrikaans| [[::UsingUUID/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ar | • {{#if: UbuntuHelp:UsingUUID|العربية| [[::UsingUUID/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/az | • {{#if: UbuntuHelp:UsingUUID|azərbaycanca| [[::UsingUUID/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/bcc | • {{#if: UbuntuHelp:UsingUUID|جهلسری بلوچی| [[::UsingUUID/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/bg | • {{#if: UbuntuHelp:UsingUUID|български| [[::UsingUUID/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/br | • {{#if: UbuntuHelp:UsingUUID|brezhoneg| [[::UsingUUID/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ca | • {{#if: UbuntuHelp:UsingUUID|català| [[::UsingUUID/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/cs | • {{#if: UbuntuHelp:UsingUUID|čeština| [[::UsingUUID/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/de | • {{#if: UbuntuHelp:UsingUUID|Deutsch| [[::UsingUUID/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/el | • {{#if: UbuntuHelp:UsingUUID|Ελληνικά| [[::UsingUUID/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/es | • {{#if: UbuntuHelp:UsingUUID|español| [[::UsingUUID/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/fa | • {{#if: UbuntuHelp:UsingUUID|فارسی| [[::UsingUUID/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/fi | • {{#if: UbuntuHelp:UsingUUID|suomi| [[::UsingUUID/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/fr | • {{#if: UbuntuHelp:UsingUUID|français| [[::UsingUUID/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/gu | • {{#if: UbuntuHelp:UsingUUID|ગુજરાતી| [[::UsingUUID/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/he | • {{#if: UbuntuHelp:UsingUUID|עברית| [[::UsingUUID/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/hu | • {{#if: UbuntuHelp:UsingUUID|magyar| [[::UsingUUID/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/id | • {{#if: UbuntuHelp:UsingUUID|Bahasa Indonesia| [[::UsingUUID/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/it | • {{#if: UbuntuHelp:UsingUUID|italiano| [[::UsingUUID/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ja | • {{#if: UbuntuHelp:UsingUUID|日本語| [[::UsingUUID/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ko | • {{#if: UbuntuHelp:UsingUUID|한국어| [[::UsingUUID/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ksh | • {{#if: UbuntuHelp:UsingUUID|Ripoarisch| [[::UsingUUID/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/mr | • {{#if: UbuntuHelp:UsingUUID|मराठी| [[::UsingUUID/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ms | • {{#if: UbuntuHelp:UsingUUID|Bahasa Melayu| [[::UsingUUID/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/nl | • {{#if: UbuntuHelp:UsingUUID|Nederlands| [[::UsingUUID/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/no | • {{#if: UbuntuHelp:UsingUUID|norsk| [[::UsingUUID/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/oc | • {{#if: UbuntuHelp:UsingUUID|occitan| [[::UsingUUID/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/pl | • {{#if: UbuntuHelp:UsingUUID|polski| [[::UsingUUID/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/pt | • {{#if: UbuntuHelp:UsingUUID|português| [[::UsingUUID/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ro | • {{#if: UbuntuHelp:UsingUUID|română| [[::UsingUUID/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/ru | • {{#if: UbuntuHelp:UsingUUID|русский| [[::UsingUUID/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/si | • {{#if: UbuntuHelp:UsingUUID|සිංහල| [[::UsingUUID/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/sq | • {{#if: UbuntuHelp:UsingUUID|shqip| [[::UsingUUID/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/sr | • {{#if: UbuntuHelp:UsingUUID|српски / srpski| [[::UsingUUID/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/sv | • {{#if: UbuntuHelp:UsingUUID|svenska| [[::UsingUUID/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/th | • {{#if: UbuntuHelp:UsingUUID|ไทย| [[::UsingUUID/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/tr | • {{#if: UbuntuHelp:UsingUUID|Türkçe| [[::UsingUUID/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/vi | • {{#if: UbuntuHelp:UsingUUID|Tiếng Việt| [[::UsingUUID/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/yue | • {{#if: UbuntuHelp:UsingUUID|粵語| [[::UsingUUID/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/zh | • {{#if: UbuntuHelp:UsingUUID|中文| [[::UsingUUID/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/zh-hans | • {{#if: UbuntuHelp:UsingUUID|中文(简体)| [[::UsingUUID/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UsingUUID | UbuntuHelp:UsingUUID | {{#if: | :}}UsingUUID}}/zh-hant | • {{#if: UbuntuHelp:UsingUUID|中文(繁體)| [[::UsingUUID/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:UsingUUID|:UsingUUID|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UsingUUID/zh | | {{#ifexist: UsingUUID/zh | | {{#ifeq: {{#titleparts:UsingUUID|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UsingUUID|1|-1|}} | zh | | }}
Since Edgy, Ubuntu requires the use of UUID or LABEL (for filesystems including swap), or udev-created symlinks (for removable media like CDROMs and USB drives). Directly using /dev/hd*
or /dev/sd*
is no longer supported (since these device assignments can change from boot to boot):
- all filesystems should be specified by
UUID=
orLABEL=
- all physical devices should be specified by a symlink (e.g.
/dev/cdrom
,/dev/disk/by-id/...
, etc.)
The files for which this is most critical are:
/boot/grub/menu.lst
/etc/fstab
/etc/initramfs-tools/conf.d/resume
Finding
UUIDs can be determined using the vol_id
command. For example, to find the UUID for the filesystem on /dev/sda1
:
$ sudo /sbin/vol_id -u /dev/sda1 79415992-7093-4a0e-a2e5-4574ed702d05
Symlinks created by udev can be found by searching for the target device in /dev
. For example, to find /dev/sda1
:
$ ls -la /dev/disk/by-id | grep /sda1$ lrwxrwxrwx 1 root root 10 8207-06-10 02:46 ata-ST2250823AS_3ND277BL-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 8207-06-10 02:46 scsi-1ATA_ST2250823AS_3ND277BL-part1 -> ../../sda1
Converting
To perform these UUID lookups and corrections automatically (which should have already happened during the Dapper to Edgy upgrade) please use:
- For
/boot/grub/menu.lst
:
sudo update-grub
- For
/etc/fstab
:
sudo rm -f /etc/fstab.pre-uuid sudo /var/lib/dpkg/info/volumeid.postinst configure
- For
/etc/initramfs-tools/conf.d/resume
, there is no automatic procedure: - Verify that
RESUME=
matches yourswap
line in/etc/fstab
- After any adjustment, run
sudo update-initramfs -u