You are not logged in.

#1 2013-12-02 20:30:33

Ztjuh
Member
Registered: 2011-05-30
Posts: 58

[SOLVED] Booting archlinux.img from NTFS with SysLinux

I'm trying to boot Arch Linux from a NTFS drive. But at the moment I'm stuck in busybox [rootfs /].

/dev/sdb1 is my ntfs partition, which gets mounted to /new_root in busybox. I tried umounting it and re-mounting it to /host, then I mounted /host/images/archlinux.img to /new_root. Is there anything I'm doing wrong? Also I think I'm probally missing directorys in my initramfs-linux.img.

This is what happens:

:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
:: performing fsck on '/dev/sdb1'
fsck: fsck.ntfs: not found
fsck: error 2 while executing fsck.ntfs for /dev/sdb1
ERROR: fsck failed on '/dev/sdb1'
:: mounting '/dev/sdb1' on real root
:: running late hook [usr]
running cleanup hook [shutdown]
running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

sh: can't access tty; job control turned off
[rootfs /]# _

This is what i tried:

[rootfs /]# mkdir /host
[rootfs /]# umount /new_root
[rootfs /]# ntfs-3g /dev/sdb1 /host
[rootfs /]# mount -o loop /host/images/archlinux.img /new_root
[rootfs /]# /new_root/lib/systemd/systemd
/new_root/lib/systemd/systemd: error while loading shared libraries: libsystemd-daemon.so.0: cannot open shared object: No such file or directory
[rootfs /]# _

Successfully mounted to /new_root. But how to start?

/boot/syslinux/syslinux.cfg:

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sdb1 rootfstype=ntfs loop=images/archlinux.img loopfstype=ext4 rw
    INITRD ../initramfs-linux.img

/etc/mkinitcpio.conf:

MODULES="loop fuse ext4"
BINARIES="/usr/bin/mount.fuse /usr/bin/mount /usr/bin/mount.lowntfs-3g /usr/bin/mount.ntfs /usr/bin/mount.ntfs-3g"
FILES=""
HOOKS="base udev autodetect modconf block filesystems keyboard looproot fsck shutdown usr"

Like I said above I think I'm also missing some files/directorys from my initramfs-linux.img here is the output of mkinitcpio -v -p linux:
http://pastebin.com/WZWmGpfg

Hope someone can help me out! smile

Last edited by Ztjuh (2013-12-03 00:20:38)

Offline

#2 2013-12-02 21:28:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Ztjuh wrote:

I'm trying to boot Arch Linux from a NTFS drive.

Why NTFS?

Offline

#3 2013-12-02 21:58:40

Ztjuh
Member
Registered: 2011-05-30
Posts: 58

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Just a little project, trying if it's possible and so, keeps me busy smile

Offline

#4 2013-12-02 21:58:54

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Somehow, I don't think you're going to succeed here, considering NTFS doesn't respect Linux file permissions.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5 2013-12-02 22:10:09

Ztjuh
Member
Registered: 2011-05-30
Posts: 58

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Well the archlinux.img file is formatted ext4 tongue

And why shouldn't it be possible? You can install Ubuntu on a NTFS drive through wubi... smile

Last edited by Ztjuh (2013-12-02 22:10:55)

Offline

#6 2013-12-02 22:17:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Ztjuh wrote:

And why shouldn't it be possible? You can install Ubuntu on a NTFS drive through wubi... smile

Link?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-12-02 22:24:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

jasonwryan wrote:
Ztjuh wrote:

And why shouldn't it be possible? You can install Ubuntu on a NTFS drive through wubi... smile

Link?

https://en.wikipedia.org/wiki/Wubi_(Ubuntu_installer)

https://blueprints.launchpad.net/ubuntu … -installer
I'm not sure if it's 'installing on NTFS' in the strict sense.

Last edited by karol (2013-12-02 22:26:04)

Offline

#8 2013-12-02 22:27:22

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

No. wubi is a (pretty ugly) workaround and not anything like a "real" install.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2013-12-02 22:45:43

Ztjuh
Member
Registered: 2011-05-30
Posts: 58

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Let's discuss how we can solve this. So any ideas?

I've added this to the kernel line but it still mounts /dev/sdb1 (ntfs drive) to /new_root.

real_root=/dev/loop0

EDIT: Aight I fixed it.

I edited /lib/initcpio/hooks/udev and added after 'udevadm settle'

    umount /new_root
    mkdir /host
    ntfs-3g /dev/sdb1 /host
    losetup /dev/loop0 /host/images/archlinux.img
    mount -t ext4 /host/images/archlinux.img /new_root
    mount --bind /host /new_root/host

Now it says

:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
umount: /new_root: not mounted ----------- (It's running the udev hook here)
:: performing fsck on '/dev/sdb1'
fsck: fsck.ntfs: not found
fsck: error 2 while executing fsck.ntfs for /dev/sdb1
ERROR: fsck failed on '/dev/sdb1'
:: mounting '/dev/sdb1' on real root
Mount is denied because the NTFS volume is already exclusively opened. 
The volume may be already mounted, or another software may use it which 
could be identified for example by the help of the 'fuser' command.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs /]# _

After running mount I got the following output:

[rootfs /]# mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4087356k,nr_inodes=1021839,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sdb1 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/host/images/archlinux.img on /new_root type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /new_root/host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

After typing exit Arch Linux started booting!

Last edited by Ztjuh (2013-12-03 00:16:02)

Offline

#10 2013-12-02 23:54:24

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

As much as I want to tell you to re-install onto a filesystem that actually respects Linux file permissions such as ext4 (which is my recommended course of action), because you will probably have permissions issues and other system breakage, here is a link.

If you break your system, well I told you so.

As for this:

karol wrote:
jasonwryan wrote:
Ztjuh wrote:

snip

snip

https://en.wikipedia.org/wiki/Wubi_(Ubuntu_installer)
https://blueprints.launchpad.net/ubuntu … -installer
I'm not sure if it's 'installing on NTFS' in the strict sense.

Definitely not installing Ubuntu on NTFS at all. They also don't recommend it either, because of the massive data loss it can cause on your Windows partition.

Last edited by clfarron4 (2013-12-02 23:58:03)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#11 2013-12-03 00:14:36

Ztjuh
Member
Registered: 2011-05-30
Posts: 58

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

clfarron4 wrote:

As much as I want to tell you to re-install onto a filesystem that actually respects Linux file permissions such as ext4 (which is my recommended course of action), because you will probably have permissions issues and other system breakage, here is a link.

If you break your system, well I told you so.

As for this:

karol wrote:
jasonwryan wrote:

snip

https://en.wikipedia.org/wiki/Wubi_(Ubuntu_installer)
https://blueprints.launchpad.net/ubuntu … -installer
I'm not sure if it's 'installing on NTFS' in the strict sense.

Definitely not installing Ubuntu on NTFS at all. They also don't recommend it either, because of the massive data loss it can cause on your Windows partition.

Like I said before it's just a project to try if I can make it work, and it works after some time struggling, and I know this is not a great option to run a Linux system, just wanted to try it out. And it works. Now I don't have anything todo anymore xD

Offline

#12 2013-12-03 00:41:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Booting archlinux.img from NTFS with SysLinux

Ztjuh wrote:

Now I don't have anything todo anymore xD

If you have too much time on your hands you can adopt some packages in the AUR, fix bugs, update wiki articles ... :-)

Offline

Board footer

Powered by FluxBB