rtorrent installation gone bad - weird issues

Got problems with Bubba? Then this forum is for you.
TheEagleCD
Posts: 46
Joined: 27 Feb 2007, 16:44
Location: Austria
Contact:

rtorrent installation gone bad - weird issues

Post by TheEagleCD » 23 Mar 2007, 19:42

Hi,

I wanted to install rtorrent so I could add and control my torrent downloads via ssh and on my mobile phone. To that end I added the testing and unstable repositories to my sources.list, hit apt-get update and afterwards apt-get install rtorrent.

And that's where all the trouble started. I was a bit shocked when I read something about "ftd" being deleted. But the installation continued anyway. rtorrent actually seemed to work quite fine. On the other hand I suddenly lost access to the web-interface. I can still access http://bubba/ but for bubba/web-admin/index.php I get a "was not found on this server" message. Oddly enough the index.php file was still in the right directory.

I thought that maybe a reboot would help solve this issue, given that during the rtorrent installation all the services running on the machine had been stopped and restarted.

Since restarting Bubba the LED hasn't stopped blinking. But I can still access http://bubba/ and I can also get to my Samba shares. One thing that I can however not do is ssh into the machine, Putty always gives me a "network error: connection refused" message.

To me it seems as though the rtorrent installation not only got rid of ftd but it apparently also messed up the startup process. I assume that the ssh-server for example simply hasn't been started.

Now the obvious question, what do I do?

Thanks in advance,
Christoph
P.S. "Never change a running system" - damn, I should have thought of this phrase a bit earlier... :(
Bubba, I'm lovin' it

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 23 Mar 2007, 20:45

Hi again TheEagleCD,

Too bad ! If the led is still blinking you may have hope. All services should not be started. After a reboot my bubba took literally hours to be back again.

The good news is you can reinstall ftd with apt.
Good luck.

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 24 Mar 2007, 04:54

Hi TheEagleCD,

Unfortunately this sounds like an upgrade that has gone wrong :(

The problem most likely is because of the rtorrent installation. rtorrent uses libtorrent which is also used by the filetransfer daemon, ftd. So when installing rtorrent you most likely got another version of libtorrrent which would conflict with ftd that most likely would be removed then.

Further on, our bubba package with the filesystem for the bubba-specifix parts depends on ftd and thus was most likely be removed.

The problems in this case, without the bubba package, would be something that you experience.

The led would not stop blinking since its stopped by the bubba package.
SSH could be rendered useless since the bubba package has its own ssh-configuration, if thats missing i doubt ssh will start correctly.

So in the end, you most likely have a working Debian system but unfortunately no way to reach it :(

In this case you have two options. Both difficult in different ways.

The technicaly difficult one is to attach a serial cable to your bubba. Log in on the console, fix the sshd_config file to give back ssh login. And then restore the system.

The other thing you can do is to do a complete reinstall from an external medium as described in the users manual A tough choice since that includes a reformat of the harddrive.

There is a third non supported way. And that is to use a special "install image" that can be used for rescue. We have one internally that boots from an usb-stick and then gives you a telnet service to connect to. One could use that to connect to the bubba and then mount the harddrive and fix the missing ssh-config. This however is not recomended if one does not know ones way around a minimal Linux system.

If you are interested in that way i will try to dig that image up.

Other than that i unfortunately have no other ideas. If i do i will let you know. Anyone else?

/Tor
Co-founder OpenProducts and Ex Excito Developer

bjorn
Posts: 88
Joined: 03 Jan 2007, 09:02

Post by bjorn » 24 Mar 2007, 07:52

Hi!

One could modify the bubba.img-installer-on-usb-stick to make it non-destructive for user-data.

A complete format is not really necessary!

For example: remove the harddrive format sections of /bin/bubbainstaller.sh, and make sure to keep areas where user-data is stored (such as /home and /var/samba/storage and perhaps more places which i can't think of right now) intact and "rm -rf" the rest and then extract payload.tar.gz to /

/Bjorn

John W
Posts: 62
Joined: 17 Jan 2007, 11:47

Post by John W » 24 Mar 2007, 09:17

bjorn wrote:Hi!

One could modify the bubba.img-installer-on-usb-stick to make it non-destructive for user-data.

A complete format is not really necessary!

For example: remove the harddrive format sections of /bin/bubbainstaller.sh, and make sure to keep areas where user-data is stored (such as /home and /var/samba/storage and perhaps more places which i can't think of right now) intact and "rm -rf" the rest and then extract payload.tar.gz to /

/Bjorn
Maybe you could add "/etc/init.d/telnetd" and get Telnet running? :?

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 24 Mar 2007, 13:44

Hi,

Sounds like someone have dissected our installer :)

The idea of an reinstall but keep user content image sounds like a good idea. If one limits to only keep user data it shouldnt be to hard to do.

Regarding enabeling telnetd on the install image, that should be possible as well. I think the binary is on it but not started.

/Tor
Co-founder OpenProducts and Ex Excito Developer

TheEagleCD
Posts: 46
Joined: 27 Feb 2007, 16:44
Location: Austria
Contact:

Post by TheEagleCD » 24 Mar 2007, 14:12

Thanks to everyone for your suggestions, I really appreciate your support!

From your latest comments I gather that bjorn's suggestion should actually work, right?

tor, could you upload that install image to somewhere on your webserver so I can download it and modify it according to bjorn's advice?

I think I'll certainly give this a shot as it sounds like my best choice at the moment. I'll still backup all the data (only 30GB so far, I haven't really had time to put too many files on the Bubba) to my flatmate's computer. Better to be save than sorry as they say.

If I'm lucky that way of restoring could work out well. And if bad comes to worse I'll simply have to do a complete wipeout and start from scratch again.

Thanks again,
Christoph
P.S. And another lesson learned in the endless game of "you should never change a running system, stupid". :P
Bubba, I'm lovin' it

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 24 Mar 2007, 14:40

Hi Christoph,
TheEagleCD wrote:tor, could you upload that install image to somewhere on your webserver so I can download it and modify it according to bjorn's advice?
You'll find the image here: http://update.excito.net/install/latest/

Hang in there!

TheEagleCD
Posts: 46
Joined: 27 Feb 2007, 16:44
Location: Austria
Contact:

Post by TheEagleCD » 24 Mar 2007, 14:59

Thanks for the quick reply, I'm downloading the file as we speak...

Now what *exactly* do I have to change in /bin/bubbainstaller.sh in order to re-install the whole setup without loosing my files?
Bubba, I'm lovin' it

John W
Posts: 62
Joined: 17 Jan 2007, 11:47

Post by John W » 24 Mar 2007, 15:09

TheEagleCD wrote:Thanks for the quick reply, I'm downloading the file as we speak...

Now what *exactly* do I have to change in /bin/bubbainstaller.sh in order to re-install the whole setup without loosing my files?
Well, it could look something like this.
Any comments? :roll:

Code: Select all

#! /bin/sh

echo "Setting date"
/usr/bin/wget -O - http://www.excito.com/install/date.php | /usr/bin/xargs /bin/date
/sbin/hwclock --systohc

mount -text3 /dev/hda1 /mnt

cd /mnt
rm -rf bin/
rm -rf boot/
rm -rf dev/
rm -rf etc/
rm -rf initrd/
rm -rf lib/
rm -rf lost+found/
rm -rf media/
rm -rf opt/
rm -rf proc/
rm -rf root/
rm -rf sbin/
rm -rf srv/
rm -rf sys/
rm -rf tmp/
rm -rf usr/

cd var/
rm -rf backups/
rm -rf cache/
rm -rf lib/
rm -rf local/
rm -rf lock/
rm -rf log/
rm -rf mail/
rm -rf opt/
rm -rf run/
rm -rf spool/
rm -rf tmp/
rm -rf www/

cd /mnt
tar zxvf /usr/share/payload/*.tar.gz
reboot
Linux-experts, does it look ok?
Does anybody know for sure that the home-directory won't get overwritten under the file-extraction?

TheEagleCD
Posts: 46
Joined: 27 Feb 2007, 16:44
Location: Austria
Contact:

Post by TheEagleCD » 24 Mar 2007, 16:28

John: Thanks for the information. I guess I'll wait to see what tor and Johannes are suggesting to put into that .sh file... :)
Bubba, I'm lovin' it

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 26 Mar 2007, 14:18

Hi again TheEagleCD,

When only looking at the script above it looks ok with a few comments. (Thanks John)

If you have any content in the "public" webserver path, dont delete /var/www

If you have anything stored in roots home folder dont delete that either.

Other than that it looks like it should work. Can of course don't promise anything without testing it.

/Tor
Co-founder OpenProducts and Ex Excito Developer

John W
Posts: 62
Joined: 17 Jan 2007, 11:47

Post by John W » 26 Mar 2007, 14:52

tor wrote:Hi again TheEagleCD,

When only looking at the script above it looks ok with a few comments. (Thanks John)

If you have any content in the "public" webserver path, dont delete /var/www

If you have anything stored in roots home folder dont delete that either.

Other than that it looks like it should work. Can of course don't promise anything without testing it.

/Tor
The existing files in /var/www, won't they get overwritten when you extract the new files? I don't know, that's why i wonder. :?

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 26 Mar 2007, 15:04

John,

Yeah you are right, the index.html and the images provided there would be overwritten.

Maybe one should add a backup of the old content. Changing the line:

Code: Select all

rm -rf www/ 
To

Code: Select all

cp -a www www.sav
/Tor
Co-founder OpenProducts and Ex Excito Developer

TheEagleCD
Posts: 46
Joined: 27 Feb 2007, 16:44
Location: Austria
Contact:

Post by TheEagleCD » 26 Mar 2007, 15:43

Thanks so much for all the advice. Now I've extracted bubbainstall.sh from the image, adapted everything and ... well, now I'm looking for a Windows application that allows me to insert the updated file back into the ISO image!

WinImage, the application that everyone seems to be recommending, somehow doesn't allow me to inject the new bubbainstall.sh into the imagine.

Does anyone happen to have an idea which tool I could use?

Cheers,
Christoph
Bubba, I'm lovin' it

Locked