Então, eu estou tentando instalar o Virtual Box no meu ChrUbuntu, no entanto, ele se queixou de falta de cabeçalhos.
Então, usei o script aqui:
#!/bin/bash
set -x
#
# Grab verified boot utilities from ChromeOS.
#
mkdir -p /usr/share/vboot
mount -o ro /dev/sda3 /mnt
cp /mnt/usr/bin/vbutil_* /usr/bin
cp /mnt/usr/bin/dump_kernel_config /usr/bin
rsync -avz /mnt/usr/share/vboot/ /usr/share/vboot/
umount /mnt
#
# On the Acer C7, ChromeOS is 32-bit, so the verified boot binaries need a
# few 32-bit shared libraries to run under ChrUbuntu, which is 64-bit.
#
apt-get install libc6:i386 libssl1.0.0:i386
#
# Fetch ChromeOS kernel sources from the Git repo.
#
apt-get install git-core
cd /usr/src
git clone https://git.chromium.org/git/chromiumos/third_party/kernel.git
cd kernel
git checkout origin/chromeos-3.4
#
# Configure the kernel
#
# First we patch ``base.config`` to set ``CONFIG_SECURITY_CHROMIUMOS``
# to ``n`` ...
cp ./chromeos/config/base.config ./chromeos/config/base.config.orig
sed -e \
's/CONFIG_SECURITY_CHROMIUMOS=y/CONFIG_SECURITY_CHROMIUMOS=n/' \
./chromeos/config/base.config.orig > ./chromeos/config/base.config
./chromeos/scripts/prepareconfig chromeos-intel-pineview
#
# ... and then we proceed as per Olaf's instructions
#
yes "" | make oldconfig
#
# Build the Ubuntu kernel packages
#
apt-get install kernel-package
make-kpkg kernel_image kernel_headers
#
# Backup current kernel and kernel modules
#
tstamp=$(date +%Y-%m-%d-%H%M)
dd if=/dev/sda6 of=/kernel-backup-$tstamp
cp -Rp /lib/modules/3.4.0 /lib/modules/3.4.0-backup-$tstamp
#
# Install kernel image and modules from the Ubuntu kernel packages we
# just created.
#
dpkg -i /usr/src/linux-*.deb
#
# Extract old kernel config
#
vbutil_kernel --verify /dev/sda6 --verbose | tail -1 > /config-$tstamp-orig.txt
#
# Add ``disablevmx=off`` to the command line, so that VMX is enabled (for VirtualBox & Co)
#
sed -e 's/$/ disablevmx=off/' \
/config-$tstamp-orig.txt > /config-$tstamp.txt
#
# Wrap the new kernel with the verified block and with the new config.
#
vbutil_kernel --pack /newkernel \
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
--version 1 \
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--config=/config-$tstamp.txt \
--vmlinuz /boot/vmlinuz-3.4.0 \
--arch x86_64
#
# Make sure the new kernel verifies OK.
#
vbutil_kernel --verify /newkernel
#
# Copy the new kernel to the KERN-C partition.
#
dd if=/newkernel of=/dev/sda6
E tudo parece bem, mas no final da minha saída de terminal, eu recebo isso:
futility failed to exec /usr/bin/old_bins/vbutil_kernel: No such file or directory
+ vbutil_kernel --verify /newkernel
futility failed to exec /usr/bin/old_bins/vbutil_kernel: No such file or directory
o que há de errado aqui?
Aqui está toda a saída do terminal para referência:
+ mkdir -p /usr/share/vboot
+ mount -o ro /dev/sda3 /mnt
+ cp /mnt/usr/bin/vbutil_firmware /mnt/usr/bin/vbutil_kernel /mnt/usr/bin/vbutil_key /mnt/usr/bin/vbutil_keyblock /mnt/usr/bin/vbutil_what_keys /usr/bin
+ cp /mnt/usr/bin/dump_kernel_config /usr/bin
+ rsync -avz /mnt/usr/share/vboot/ /usr/share/vboot/
sending incremental file list
sent 989 bytes received 14 bytes 2006.00 bytes/sec
total size is 313461 speedup is 312.52
+ umount /mnt
+ apt-get install libc6:i386 libssl1.0.0:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6:i386 is already the newest version.
libssl1.0.0:i386 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
+ apt-get install git-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
git-core is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
+ cd /usr/src
+ git clone https://git.chromium.org/git/chromiumos/third_party/kernel.git
fatal: destination path 'kernel' already exists and is not an empty directory.
+ cd kernel
+ git checkout origin/chromeos-3.4
M chromeos/config/base.config
HEAD is now at e9459bc... drm/exynos: Add trace_exynos_page_flip_state event
+ cp ./chromeos/config/base.config ./chromeos/config/base.config.orig
+ sed -e s/CONFIG_SECURITY_CHROMIUMOS=y/CONFIG_SECURITY_CHROMIUMOS=n/ ./chromeos/config/base.config.orig
+ ./chromeos/scripts/prepareconfig chromeos-intel-pineview
+ yes
+ make oldconfig
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
+ apt-get install kernel-package
Reading package lists... Done
Building dependency tree
Reading state information... Done
kernel-package is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
+ make-kpkg kernel_image kernel_headers
exec make kpkg_version=12.036+nmu2 -f /usr/share/kernel-package/ruleset/minimal.mk debian
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 12.036+nmu2.
test -d debian || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog Control Control.bin86 config templates.in rules; do \
cp -f /usr/share/kernel-package/$file ./debian/; \
done
for dir in Config docs examples ruleset scripts pkg po; do \
cp -af /usr/share/kernel-package/$dir ./debian/; \
done
test -f debian/control || sed -e 's/=V/3.4.0/g' \
-e 's/=D/3.4.0-10.00.Custom/g' -e 's/=A/amd64/g' \
-e 's/=SA//g' \
-e 's/=I//g' \
-e 's/=CV/3.4/g' \
-e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
/usr/share/kernel-package/Control > debian/control
test -f debian/changelog || sed -e 's/=V/3.4.0/g' \
-e 's/=D/3.4.0-10.00.Custom/g' -e 's/=A/amd64/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
-e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' \
/usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory `/usr/src/kernel'
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make ARCH=x86_64 \
oldconfig;
make[2]: Entering directory `/usr/src/kernel'
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
make[2]: Leaving directory `/usr/src/kernel'
make ARCH=x86_64 prepare
make[2]: Entering directory `/usr/src/kernel'
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: Leaving directory `/usr/src/kernel'
make[2]: Entering directory `/usr/src/kernel'
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `relocs'.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC kernel/bounds.s
cc1: error: unrecognized command line option ‘-fstack-protector-strong’
make[3]: *** [kernel/bounds.s] Error 1
make[2]: *** [prepare0] Error 2
make[2]: Leaving directory `/usr/src/kernel'
make[1]: *** [debian/stamp/conf/kernel-conf] Error 2
make[1]: Leaving directory `/usr/src/kernel'
make: *** [debian/stamp/conf/minimal_debian] Error 2
Failed to create a ./debian directory: at /usr/bin/make-kpkg line 984.
+ date +%Y-%m-%d-%H%M
+ tstamp=2013-10-12-0337
+ dd if=/dev/sda6 of=/kernel-backup-2013-10-12-0337
32768+0 records in
32768+0 records out
16777216 bytes (17 MB) copied, 0.219556 s, 76.4 MB/s
+ cp -Rp /lib/modules/3.4.0 /lib/modules/3.4.0-backup-2013-10-12-0337
+ dpkg -i /usr/src/linux-*.deb
dpkg: error processing /usr/src/linux-*.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/usr/src/linux-*.deb
+ + vbutil_kerneltail -1
--verify /dev/sda6 --verbose
futility failed to exec /usr/bin/old_bins/vbutil_kernel: No such file or directory
+ sed -e s/$/ disablevmx=off/ /config-2013-10-12-0337-orig.txt
+ vbutil_kernel --pack /newkernel --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=/config-2013-10-12-0337.txt --vmlinuz /boot/vmlinuz-3.4.0 --arch x86_64
futility failed to exec /usr/bin/old_bins/vbutil_kernel: No such file or directory
+ vbutil_kernel --verify /newkernel
futility failed to exec /usr/bin/old_bins/vbutil_kernel: No such file or directory
+ dd if=/newkernel of=/dev/sda6
dd: opening `/newkernel': No such file or directory