You are not logged in.
So I have hit a wall with my linux skills, I would like to change the unionfs mount so that it loads both partitons as rw.
I initially thought it would just be a case of changing mtab, but even with loading another os by usb and then going into the sda1 it gives me fsync errors.
Has anyone successfully managed to change the way unionfs mounts sda1?
Offline
It's the initrd/init which mounts / with unionfs.
mount -t unionfs -o dirs=/mnt-user=rw:/mnt-system=ro unionfs /mnt
exec switch_root /mnt $INIT </mnt/dev/null >/mnt/dev/null
And be carreful to the fastinit executable, it deals with unionfs (/sbin/unionctl.static / --remove / > /dev/null 2>&1, ...)
Remember, EEE DOESN'T use the init sysV boot process.
mtab is not the right file neither (symlink to /proc/mount), it's fstab.
Last edited by Kibobo (2007-11-11 10:50:42 am)
Offline
note that initrd/init is executed from /dev/sda1 before the union is made. You cannot easily change that
Offline
You should be able to do it if you boot off a USB drive. But how do you reconcile the existing changes that were created by putting replacement versions of files in sda2?
Offline
eFfeM wrote:
note that initrd/init is executed from /dev/sda1 before the union is made. You cannot easily change that
Just make an other initramfs (cpio/gz) and add an entry in the grub menu, that's all.
You just have to change one file (init).
I'll try, tomorow, to merge the two fs in a read-write one to see if the fastinit executable can deal with that.
Last edited by Kibobo (2007-11-11 4:08:11 pm)
Offline
hey some interesting things popped up when i wss looking for info on why updatedb is so wack
basically you have to add /UNIONFS to your path
but in my google searching i bumped into this:
http://lkml.org/lkml/2007/1/12/58
which is not good, it mean if one wants to use multiuser with the default xandros its a bad thing
Offline
Kibobo wrote:
eFfeM wrote:
note that initrd/init is executed from /dev/sda1 before the union is made. You cannot easily change that
Just make an other initramfs (cpio/gz) and add an entry in the grub menu, that's all.
You just have to change one file (init).
I'll try, tomorow, to merge the two fs in a read-write one to see if the fastinit executable can deal with that.
the grub config menu is also on sda1. I've also found that sda1 is "resistant" to mounting(or remounting) while oddly enough sda2 can be mounted just fine.
Offline
Edit grub file with the rescue console.
http://www.blogeee.net/forum/viewtopic.php?t=275
Last edited by Kibobo (2007-11-12 10:26:54 am)
Offline
Kibobo wrote:
eFfeM wrote:
note that initrd/init is executed from /dev/sda1 before the union is made. You cannot easily change that
Just make an other initramfs (cpio/gz) and add an entry in the grub menu, that's all.
You just have to change one file (init).
I'll try, tomorow, to merge the two fs in a read-write one to see if the fastinit executable can deal with that.
Kibobo,
could you please give us the actual init and/or grub file you have created? It would be much easier to replicate for beginners (like myself)
Offline
Kibobo wrote:
bye bye unionfs
Is it possible to remove unionfs completely by using your approach? That would be ideal!!!
Offline
Kibobo wrote:
unionfs is completely removed.
Details please.... I want to remove all those unnecessary apps to have space for other things...
Thank you so much for your advice!
Last edited by Gadgetguy (2007-11-12 1:34:06 pm)
Offline
My initrd/init file:
#!/bin/sh
mount -t proc proc /proc
if [ -n "$XANDROSBOOTDEBUG" ]; then
/bin/busybox sh
set -x
fi
ROOT=`cat /proc/cmdline | sed 's/.*root=// ; s/ .*//'`
#VERSION=`cat /proc/version | cut -f3 -d" "`
mount -t ext2 -o rw $ROOT /mnt
if [ $? -ne 0 ] ; then
echo Could not mount OS on $ROOT. Starting debugging shell....
/bin/busybox sh
fi
#if [ -n "$XANDROSSCAN" ]; then
# exec switch_root /mnt-system /sbin/scanuser.sh
#fi
#if [ -n "$XANDROSRESTORE" ]; then
# exec switch_root /mnt-system /sbin/formatuser.sh
#fi
#if [ -z "`grep nosplash /proc/cmdline`" ]; then
# echo -n ""
# cp /mnt-system/boot/startup.fb /dev/fb/0
#fi
#if ! mount -t ext3 -o rw /dev/sda2 /mnt-user; then
# echo Error mounting user partition. Must run filesystem scan!
# exec switch_root /mnt-system /sbin/scanuser.sh
#fi
# Factory auto-format functionality
#if [ -f /mnt-user/.autoformat ]; then
# umount /mnt-user
# exec switch_root /mnt-system /sbin/formatuser.sh -- --auto
#fi
#insmod /mnt-system/lib/modules/$VERSION/kernel/fs/unionfs/unionfs.ko > /dev/null
#mount -t unionfs -o dirs=/mnt-user=rw:/mnt-system=ro unionfs /mnt
#if [ $? -ne 0 ]; then
# echo Could not mount unionfs. Starting debugging shell....
# /bin/busybox sh
#fi
#mount --move /mnt-system /mnt/mnt
#umount -l /mnt-user
umount /proc
if [ -n "$INIT" ]; then
if [ -n "$XANDROSBOOTDEBUG" ]; then
exec switch_root /mnt $INIT </mnt/dev/console >/mnt/dev/console
else
exec switch_root /mnt $INIT </mnt/dev/null >/mnt/dev/null
fi
else
exec switch_root /mnt /sbin/fastinit "$@" </mnt/dev/console >/mnt/dev/console
fi
echo
echo Init Failed. Starting emergency shell....
/bin/busybox shTo extract initramfs:
gunzip initramfs-eeepc.gz cpio -iF initramfs-eeepc
To rebuild initramfs:
cd /boot/initramfs find | cpio -H newc -o | gzip -9 > ../initramfs-wunion.img
And add the new grub line
title New Boot
root (0x80,0)
kernel /boot/vmlinuz-2.6.21.4-eeepc quiet rw vga=785 irqpoll root=/dev/sda1
initrd /boot/initramfs-wunion.imgYou can also copy your files in sda2 to sda1, change ext2 to ext3 and resize sda1.
Have fun !
Last edited by Kibobo (2007-11-12 2:07:40 pm)
Offline
nice kibobo,
I didn't come to sorting that out yet.
Can someone put this in the wiki (don't have the time to do that myself right now)
Offline
Thank you Kikobo!!!
Is it fair to assume, that if I were to boot the eeePC from CD, using Knoppix, I could modify initrd/init without having to touch initramfs?
So I would need to modify only that one file (using the details you provided), right?
Thanks again,
Miklos
Last edited by Gadgetguy (2007-11-12 3:56:24 pm)
Offline
initrd/init IS initramfs.
I have just commented and modified one or two lines of init file.
No need to knoppix or something, extract and modify initramfs file with xandros, rebuild, save the result (actually on sda2), reboot on rescue console, mount sda1 and sda2 (/mnt-system, /mnt-user), copy initramfs from sda2 to sda1, modify menu.lst, reboot.
Last edited by Kibobo (2007-11-12 4:13:29 pm)
Offline
Kibobo wrote:
initrd/init IS initramfs.
I have just commented and modified one or two lines of init file.
No need to knoppix or something, extract and modify initramfs file with xandros, rebuild, save the result (actually on sda2), reboot on rescue console, mount sda1 and sda2 (/mnt-system, /mnt-user), copy initramfs from sda2 to sda1, modify menu.lst, reboot.
Thank you for the clarification.
Offline
Apparently modifying menu.lst does nothing ( see here: http://forum.eeeuser.com/viewtopic.php?id=581), as the grub menu is probably hardcoded in the source code.
Kikobo, is modifying menu.lst necessery for your hack to work?
Offline
The reason menu.lst isn't doing anything is because grub gets it from sda1 not sda2, and when you edit the file from Xandros it saves it to sda2. To use Kibobo's mods you do need to boot from a different disc(Or disk)
Offline
Have you read my post ?
No need to external distro, there is a rescue console.
Gadgetguy: you must edit menu.lst to add the new initramfs file. You can also edit the command line at the grub prompt (press e).
Last edited by Kibobo (2007-11-13 2:44:20 am)
Offline
Kibobo wrote:
Have you read my post ?
No need to external distro, there is a rescue console.
Gadgetguy: you must edit menu.lst to add the new initramfs file. You can also edit the command line at the grub prompt (press e).
You mean the one here? http://www.blogeee.net/forum/viewtopic.php?t=275 Sorry my French is a bit limited so I missed the recovery boot method.
Offline
Not easy to understand ?
The important things are in english: text in bold, the code and the screenshot.
If you want, you can make a topic in english or in the wiki ![]()
Last edited by Kibobo (2007-11-13 9:09:09 am)
Offline
i'm trying to install debian on the SD
i followed your method and booted
it stopped after
mount -t ext2 -o rw $ROOT /mnt
i checked /dev, but only sda(the SSD) is found...
do i have to plug any modules for the sd drive to work?
one weird thing, i have only 1 partition on sda, but it showed sda2 and sda3
so i tried mknod -m 644 /dev/sdb1 b 8 1
but it said mount: Mounting /dev/sdb1 on /mnt failed: Invalid argument
can you give me some advice to go on? thanks!
Offline