特殊:Badtitle/NS100:FeistyEncryptedRootWithInstaller:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的1个中间版本) | |||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:FeistyEncryptedRootWithInstaller}} | {{Languages|UbuntuHelp:FeistyEncryptedRootWithInstaller}} | ||
#title Encrypted root using LUKS and ubuntu 7.04 installer | #title Encrypted root using LUKS and ubuntu 7.04 installer | ||
{|border="1" cellspacing="0" | |||
| {i} Please refer to [[UbuntuHelp:EncryptedFilesystems|EncryptedFilesystems]] for further documentation. | |||
|} | |||
Tested on a [[UbuntuHelp:VMware|VMware]] Workstation 6 computer with 512 MB RAM and i386 compatible CPU. | |||
=== Outline of solution === | === Outline of solution === | ||
<ol><li>Start the [[UbuntuHelp:LiveCD|LiveCD]] and set up working environment | <ol><li>Start the [[UbuntuHelp:LiveCD|LiveCD]] and set up working environment | ||
第11行: | 第13行: | ||
</li><li>Before reboot, <code><nowiki>chroot</nowiki></code> into <code><nowiki>/target</nowiki></code> and do the necessary changes</li></ol> | </li><li>Before reboot, <code><nowiki>chroot</nowiki></code> into <code><nowiki>/target</nowiki></code> and do the necessary changes</li></ol> | ||
=== | === LiveCD === | ||
[http://www.ubuntu.com/getubuntu/download Download] Ubuntu 7.04 Desktop Edition. This guide is not tested with other versions or variants of Ubuntu. | [http://www.ubuntu.com/getubuntu/download Download] Ubuntu 7.04 Desktop Edition. This guide is not tested with other versions or variants of Ubuntu. | ||
Boot the CD and set up keyboard, network, proxy and whatever you need. (Hint: If you're behind a proxy, set the http_proxy environment variable: <code><nowiki>export http_proxy=http://proxy:port/</nowiki></code>) | Boot the CD and set up keyboard, network, proxy and whatever you need. (Hint: If you're behind a proxy, set the http_proxy environment variable: <code><nowiki>export http_proxy=http://proxy:port/</nowiki></code>) |
2008年12月16日 (二) 18:31的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/FeistyEncryptedRootWithInstaller }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/af | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Afrikaans| [[::FeistyEncryptedRootWithInstaller/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ar | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|العربية| [[::FeistyEncryptedRootWithInstaller/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/az | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|azərbaycanca| [[::FeistyEncryptedRootWithInstaller/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/bcc | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|جهلسری بلوچی| [[::FeistyEncryptedRootWithInstaller/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/bg | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|български| [[::FeistyEncryptedRootWithInstaller/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/br | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|brezhoneg| [[::FeistyEncryptedRootWithInstaller/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ca | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|català| [[::FeistyEncryptedRootWithInstaller/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/cs | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|čeština| [[::FeistyEncryptedRootWithInstaller/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/de | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Deutsch| [[::FeistyEncryptedRootWithInstaller/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/el | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Ελληνικά| [[::FeistyEncryptedRootWithInstaller/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/es | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|español| [[::FeistyEncryptedRootWithInstaller/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/fa | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|فارسی| [[::FeistyEncryptedRootWithInstaller/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/fi | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|suomi| [[::FeistyEncryptedRootWithInstaller/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/fr | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|français| [[::FeistyEncryptedRootWithInstaller/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/gu | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|ગુજરાતી| [[::FeistyEncryptedRootWithInstaller/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/he | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|עברית| [[::FeistyEncryptedRootWithInstaller/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/hu | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|magyar| [[::FeistyEncryptedRootWithInstaller/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/id | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Bahasa Indonesia| [[::FeistyEncryptedRootWithInstaller/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/it | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|italiano| [[::FeistyEncryptedRootWithInstaller/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ja | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|日本語| [[::FeistyEncryptedRootWithInstaller/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ko | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|한국어| [[::FeistyEncryptedRootWithInstaller/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ksh | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Ripoarisch| [[::FeistyEncryptedRootWithInstaller/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/mr | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|मराठी| [[::FeistyEncryptedRootWithInstaller/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ms | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Bahasa Melayu| [[::FeistyEncryptedRootWithInstaller/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/nl | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Nederlands| [[::FeistyEncryptedRootWithInstaller/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/no | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|norsk| [[::FeistyEncryptedRootWithInstaller/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/oc | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|occitan| [[::FeistyEncryptedRootWithInstaller/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/pl | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|polski| [[::FeistyEncryptedRootWithInstaller/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/pt | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|português| [[::FeistyEncryptedRootWithInstaller/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ro | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|română| [[::FeistyEncryptedRootWithInstaller/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/ru | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|русский| [[::FeistyEncryptedRootWithInstaller/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/si | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|සිංහල| [[::FeistyEncryptedRootWithInstaller/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/sq | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|shqip| [[::FeistyEncryptedRootWithInstaller/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/sr | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|српски / srpski| [[::FeistyEncryptedRootWithInstaller/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/sv | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|svenska| [[::FeistyEncryptedRootWithInstaller/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/th | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|ไทย| [[::FeistyEncryptedRootWithInstaller/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/tr | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Türkçe| [[::FeistyEncryptedRootWithInstaller/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/vi | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|Tiếng Việt| [[::FeistyEncryptedRootWithInstaller/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/yue | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|粵語| [[::FeistyEncryptedRootWithInstaller/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/zh | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|中文| [[::FeistyEncryptedRootWithInstaller/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/zh-hans | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|中文(简体)| [[::FeistyEncryptedRootWithInstaller/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller | UbuntuHelp:FeistyEncryptedRootWithInstaller | {{#if: | :}}FeistyEncryptedRootWithInstaller}}/zh-hant | • {{#if: UbuntuHelp:FeistyEncryptedRootWithInstaller|中文(繁體)| [[::FeistyEncryptedRootWithInstaller/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:FeistyEncryptedRootWithInstaller|:FeistyEncryptedRootWithInstaller|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :FeistyEncryptedRootWithInstaller/zh | | {{#ifexist: FeistyEncryptedRootWithInstaller/zh | | {{#ifeq: {{#titleparts:FeistyEncryptedRootWithInstaller|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:FeistyEncryptedRootWithInstaller|1|-1|}} | zh | | }}
- title Encrypted root using LUKS and ubuntu 7.04 installer
{i} Please refer to EncryptedFilesystems for further documentation. |
Tested on a VMware Workstation 6 computer with 512 MB RAM and i386 compatible CPU.
Outline of solution
- Start the LiveCD and set up working environment
- Use
gparted
orfdisk
to partition the drive - Use
cryptsetup
to set up LUKS-encrypted partitions - Launch the installer and tell it to install to
/dev/mapper/*
- Before reboot,
chroot
into/target
and do the necessary changes
LiveCD
Download Ubuntu 7.04 Desktop Edition. This guide is not tested with other versions or variants of Ubuntu.
Boot the CD and set up keyboard, network, proxy and whatever you need. (Hint: If you're behind a proxy, set the http_proxy environment variable: export http_proxy=http://proxy:port/
)
Start a terminal and run sudo -i
to become root. Edit /etc/apt/sources.list to add the universe repository. You may want to change to a mirror close to you instead of archive.ubuntu.com. To me, it's no.archive.ubuntu.com.
Install cryptsetup and gparted. (Use fdisk or other utility if you prefer that.)
aptitude update && aptitude install cryptsetup gparted
Partitioning
Use gparted to partition your drive. You will need >= 100 MB for /boot (important: unformatted), twice your amount of RAM for swap (linux-swap) and the usual minimum for your encrypted root filesystem (important: unformatted). From now on, this guide assumes /boot is /dev/sda1, encrypted swap is /dev/sda5 and the encrypted root is /dev/sda6. Exit gparted and unmount any auto-mounted filesystems by right-clicking on them on your desktop.
LUKS
Then load some modules:
for mod in dm_crypt sha256 aes_i586; do modprobe $mod; done
Use LUKS to encrypt your root partition. This is just an example using AES in CBC-mode and SHA-256 with a passphrase. Change these parameters at will, and use smartcards or whatever you want for better security. Remember to choose a good passphrase, as this probably will be the weakest link in the setup...
cryptsetup --verify-passphrase --verbose --hash=sha256 --cipher=aes-cbc-essiv:sha256 --key-size=128 luksFormat /dev/sda6 cryptsetup luksOpen /dev/sda6 root
Installer
Start the installer and choose language and time zone.
Choose manual partitioning.
/dev/mapper/root
should be formatted and mounted as /
, while /dev/sda1
should be used as ext3 and mounted as /boot
.
Leave the swap partition as swap. We will fix that later.
/dev/sda6
(or any other encrypted partitons) should not be mounted.
Create a user and confirm your options. Go make some coffee.
Do not restart when the installer asks you to! Just click that you want to continue working with the LiveCD.
Chroot and configure
So now we have a luks partition, that was the easy part. Now we need it to boot. In my experience this has been a bit fiddly. Hopefully these instructions will help. Mount everything:
mount /dev/mapper/root /target mount /dev/sda1 /target/boot for dir in proc dev sys; do mount --bind /$dir /target/$dir; done
You need to MAKEDEV in the *rootfs* (will be copied over to your temp bind directory) to make sure you get a /dev/.static directory created, otherwise you will see errors on boot complaining it doesn't exist.
cd /dev; MAKEDEV generic
Chroot into the target:
chroot /target
I prefer to update everything, but there are probably a reason the installer doesn't do this:
aptitude update aptitude -y dist-upgrade
Install cryptsetup:
aptitude install cryptsetup
Set up /etc/crypttab
:
# <target name> <source device> <key file> <options> swap /dev/sda5 /dev/random swap root /dev/sda6 none luks
Edit /etc/fstab
and change swap to /dev/mapper/swap
(from some UUID-line).
Create /etc/initramfs-tools/conf.d/cryptroot
and add:
CRYPTOPTS=target=root,source=/dev/sda6
Copy over the pre-built cryptroot scripts (ignore other HOWTOs that tell you to create these):
cp /usr/share/initramfs-tools/hooks/cryptroot /etc/initramfs-tools/hooks/cryptroot cp /usr/share/initramfs-tools/scripts/local-top/cryptroot /etc/initramfs-tools/scripts/local-top/cryptroot
You may want to alias aes to speed performance /etc/modprobe.d/aliases
:
alias aes aes_i586
Edit /boot/grub/menu.lst
and remove quiet splash
from the defoptions-line:
# defoptions=
Run
update-grub update-initramfs -u
.
Exit the chroot, umount /target/{proc,dev,sys,boot} and (if it works) /target and reboot.