
The article discusses the possibility of installing linux on the ntfs file system.
Initially, the system was installed in a virtual machine and its image was copied via dd.
We need to install genkernel (from it was taken initramfs) and ntfs-3g to support ntfs in write mode.
# emerge genkernel ntfs3g
before creating genkernel we will copy our current config to the config for genkernel
# zcat /proc/config.gz> / usr / share / genkernel / arch / x86 / kernel-config
')
and create it.
# genkernel --menuconfig all
unpacking the original initrd
# gzip -dc /boot/initramfs-genkernel-x86-2.6.32.9 | cpio -id
modify init a bit - add
ntfs-3g / dev / sda1 / mnt
mount -o ro, loop /mnt/gentoo.img $ {NEW_ROOT}
we copy ntfs-3g in / bin an image and in / lib all dependences which will be issued by ldd
# ldd / bin / ntfs-3g
linux-gate.so.1 => (0xb787e000)
libfuse.so.2 => /usr/lib/libfuse.so.2 (0xb783f000)
librt.so.1 => /lib/librt.so.1 (0xb7836000)
libdl.so.2 => /lib/libdl.so.2 (0xb7832000)
libntfs-3g.so.73 => /lib/libntfs-3g.so.73 (0xb77e9000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb77d0000)
libc.so.6 => /lib/libc.so.6 (0xb7688000)
/lib/ld-linux.so.2 (0xb787f000)
the first library from the list is optional
create a directory with a future disk image
# mkdir -p gentoo / boot
We pack
# find. -print0 | cpio -ov -0 --format = newc | gzip -9> gentoo / boot / initramfs-genkernel-x86-2.6.32.9
we copy grub
# cp -R / boot / grub gentoo / boot
we edit menu.lst, we add item of a type:
title Gentoo Linux 2.6.32.9
root (cd)
kernel /boot/kernel-genkernel-x86-2.6.32.9 root = / dev / ram0 real_root = / dev / loop0 vga = 791
initrd = / boot / initramfs-genkernel-x86-2.6.32.9
create a disk to boot
# mkisofs -o gentoo.iso -r -J -V "gentoo-boot" -A "gentoo-boot" -b boot / grub / iso9660_stage1_5 -c boot / boot.cat -v -no-emul-boot -boot- load-size 4 -boot-info-table gentoo
burn disc
# cdrecord -v gentoo.iso
sources:
The Loopback Root Filesystem HOWTO