Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 problems with NSLU2 (slug)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
opm8
n00b
n00b


Joined: 10 Sep 2003
Posts: 56

PostPosted: Tue Feb 28, 2006 4:12 am    Post subject: 2 problems with NSLU2 (slug) Reply with quote

1) I want to be able to boot into OpenSlug when my USB enclosure is not plugged in but the boot fails with a red Ready led. It boots fine with the drive plugged in. Here is my /boot/linuxrc, which I am using in place of the default /boot/flash file. I have a feeling there are errors with this setup since I cobbled it together myself:
Code:

#!/bin/sh

/bin/mount -t proc proc /proc

export TZ=PST-8PDT

sleep 3

/bin/mount -t ext3 /dev/sda3 /mnt/gentoo

if [ $? -ne 0 ]; then
        /bin/umount /mnt/gentoo
        /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/gentoo
        /sbin/init

else    /bin/umount /proc
        cd /mnt/gentoo
        /sbin/pivot_root . mnt/initrd

         # if you've got serial you might want to add
         # < dev/console > dev/console 2>&1 to the following line
        exec /usr/sbin/chroot . /sbin/init

        exit 0



2. I have timezeone problems. I have an /etc/TZ on my mounted gentoo partition:
Code:
PST8PDT


which gives the correct time if I do a 'date' command. However, internally the slug still uses its UTC time. I know this because commands that run through cron are executed at the "wrong" time, eight hours out of whack.

Thanks for your help.

--opm8
Back to top
View user's profile Send private message
opm8
n00b
n00b


Joined: 10 Sep 2003
Posts: 56

PostPosted: Wed Mar 08, 2006 3:52 am    Post subject: Reply with quote

Anyone?
Back to top
View user's profile Send private message
+O!
n00b
n00b


Joined: 20 Jun 2004
Posts: 40
Location: Belgium

PostPosted: Wed Mar 08, 2006 10:32 pm    Post subject: Reply with quote

About a year ago I was struggling with a simular problem. I found it a big help if I started a shell and entered the commands manualy. If something went wrong that gave me the change to find out why. Something like this :
Code:

#!/bin/sh

/bin/sh

/bin/mount -t proc proc /proc

...


Then you would type
Code:

cat /boot/initrd

and just enter all the commands by hand. When you get everything right remove the /bin/sh line.

There's one thing in your linuxrc that I think might be the problem. init should be run with process id 1. That's why you have the exec in front of the "chroot . /sbin/init" command. Shouldn't you do the same thing when booting from flash ? Try this :
Code:

...
if [ $? -ne 0 ]; then
        /bin/umount /mnt/gentoo
        /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/gentoo
        exec /sbin/init

else    /bin/umount /proc
...


Grtz, +O!
_________________
Nature doesn't need to be improved,
it need's respect ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum