Reply
Thread Tools
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#1
Edit: Sorry, I meant ? rather than . in the title.

Hello,

I ran "rm -rf /" by accident. Yes, by accident! . I took out the battery but I guess it thought "the damage is done, so I guess I be leaving" :P

I plan on reflashing the rootfs but I would like to backup my current one first.

I have a ssh session open to my N800 through initfs & I can mount the rootfs in /tmp.

My question is that, how do I tar up the rootfs and send it directly to my computer?
BTW: To complicate matters, my tablet restarts after a while but not in a short time

Thanks.

Last edited by qwerty12; 2008-03-28 at 08:02.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#2
If your computer runs an ssh server then you could do:
log in to n800
cd /path-to-mounted-rootfs
Code:
tar cvf - . | ssh your-account@your-computer "cat > rootfs.tar"
(well, that supposes that your computer is a *nix box)
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#3
Without ssh, you could use nc; maybe go a bit faster (because no encryption), but not necessarily.

All modern computers (except perhaps Vista, unsure re: cygwin on Vista) are or can easily become *nix boxen. Either Linux/BSD/etc., or OSX, or WinXP with Cygwin; either way, ssh, tar, nc, are all readily available.
(Translation: if you are running XP, install cygwin. You'll thank yourself.)
 

The Following User Says Thank You to Benson For This Useful Post:
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Originally Posted by TA-t3 View Post
If your computer runs an ssh server then you could do:
log in to n800
cd /path-to-mounted-rootfs
Code:
tar cvf - . | ssh your-account@your-computer "cat > rootfs.tar"
(well, that supposes that your computer is a *nix box)
There is slightly easier way, you don't need server on your machine to log in back, you can run the command directly from your machine over ssh

Code:
ssh root@yourtabletip 'tar -cf - -C /path-to-mounted-rootfs . ' >rootfs.tar
you can also first test it like
Code:
ssh root@yourtabletip 'tar -cf - -C /path-to-mounted-rootfs . ' | tar -tvf -
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following User Says Thank You to fanoush For This Useful Post:
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#5
Originally Posted by qwerty12 View Post
BTW: To complicate matters, my tablet restarts after a while but not in a short time
It is 6 minutes and 4 seconds after kernel boot. Try to enable R&D mode via linux usb flasher, it may go away. Also try to attach charger if it makes difference. This is new 'feature' of N8x0 initfs, 770 does not reboot in this mode. I guess it is some sanity check inside dsme, perhaps it expects the tablet to boot fully in 6 minutes and expects connection from mce or dbus or whatever.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following User Says Thank You to fanoush For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#6
I use Linux :P. And XP, don't kill me.

Thanks to all who replied, I used fanoush's instructions and it worked. Mostly. This isn't fanoush's fault but the knobs at busybox:
ssh root@192.168.2.15 'tar -cf - -C /tmp/mnt . ' >rootfs.tar
root@192.168.2.15's password:
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
Fanoush, thank you very much. I set device in RD mode and booted with charger. No restarts experienced. I kinda like it in RD mode. I think I will disable serial console and keep RD enabled.

Extending on that, is it possible for bootmenu not to clear the screen when "press Menu button..." appears. I'm not bothered about it looking odd.

Last edited by qwerty12; 2008-03-28 at 15:57.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#7
Originally Posted by qwerty12 View Post
I use Linux :P. And XP, don't kill me.

Thanks to all who replied, I used fanoush's instructions and it worked. Mostly. This isn't fanoush's fault but the knobs at busybox:
Code:
ssh root@192.168.2.15 'tar -cf - -C /tmp/mnt . ' >rootfs.tar
root@192.168.2.15's password:
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
tar: Names longer than 100 chars not supported.
Yes, busybox tar :-) I guess it doesn't matter much since your rootfs is already incomplete due to that rm -rf but anyway, there are two solutions. First is to have statically linked GNU tar and scp it over to /tmp. I do have it somewhere on my disk for this situation. Second is to use tar from mounted rootfs if it is any better. In that case the line is like
Code:
ssh root@192.168.2.15 'chroot /tmp/mnt tar -cf - -C / . ' >rootfs.tar
Originally Posted by qwerty12 View Post
Fanoush, thank you very much. I set device in RD mode and booted with charger. No restarts experienced.
I guess it is because of R&D mode. Still, having charger attached is also good idea since you don't have battery meter and usb networking can drain battery.
Originally Posted by qwerty12 View Post
Extending on that, is it possible for bootmenu not to clear the screen when "press Menu button..." appears. I'm not bothered about it looking odd.
You can remove 'text2screen -c' from linuxrc and/or bootmenu.sh or if it is because of that green info in r&d mode, you can perhaps call show_rd_versions function on the end of bootmenu.sh to show the info again.

You can modify linuxrc file when initfs flasher has initfs copied and asks about something (like including bootmenu.conf). You can open new xterm window and modify anything inside initfs_flasher/initfs/
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following User Says Thank You to fanoush For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:50.