Internet connection only with restart

Asked by d-arcy

Hello,
A few days ago I did an online upgrade from Ubuntu 7.04 to 7.10. Since then my Huawei Mobile USB modem (model E220 HSDPA/3G/GPRS) only connects to the internet after a restart.
Since then I also had a few crashes and freezes, which I never experienced with 7.04. The firefox version 2.0.0.14 was irregularly slow and stalling already before, as it still is now.
While online, the connection is occasionally cut (also happened before the upgrade). But it would be handier if I could reconnect without restarting the whole computer.
Any help, comprehensible for a newbie, would be very much appreciated.
manoka

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
d-arcy
Solved:
Last query:
Last reply:
Revision history for this message
Theodotos Andreou (theodotos) said :
#1

Backup your data and do a fresh install of 8.04. 8.04 is more stable than the previous versions. Also the online upgrade is not always successful.

Revision history for this message
Shane Fagan (shanepatrickfagan) said :
#2

How did you get the huawei mobile usb modem to work?
I have one and im on ubuntu 8.04 but I cant get it to work.

Revision history for this message
d-arcy (manoka) said :
#3

First, to answer the question, this is what I did when I programed the internet access from Vodafone in Portugal for Ubuntu 7.04:
 - You have to put the SIM card into a mobile phone and deactivate the PIN code, then put it into the modem.
 - Then you go to System > Administration > Network and program as shown on http://forum.g-sat.net/showthread.php?p=336065
The phone number (Número de telefone) probably is different, depending on your provider, so it's best to ask them.
I have nothing in "Password", "Desligado" means "Off", I have enabled all the three "Options", and don't forget to activate under "Connections" the "Modem Connection".

Then about my problem; I have also the following problems:
Since I installed Ubuntu 7.04 (after using WinXP) I was unable to:
 - use my second hard drive (to delete anything there or to move anything into it; it also shows a wrong volume, 277.7 GB instead of 300 GB) and
 - to burn with the DVD burner (I unsuccessfully tried to burn the Partedmagic or Gparted software with K3b)
So I don't know how to backup my data. Otherwise the 7.10 is working mostly as 7.04 did, which means, except for the slow or stalling reactions and downloads it's okay. On the other hand I read that 8.04 is even more troublesome than 7.10.

Revision history for this message
Theodotos Andreou (theodotos) said :
#4

To backup you data:

Use a usb drive and boot with a livecd. It should see it and backup everything under /home/<username> on the external drive.

I have used 8.04 since it first came out and so did some people I know. Everybody found it to be the most bugfree and userfriendly release up to now but of-course this is a matter of personnal opinion. Remember that 8.04 is a Long Term Support release and it will be supported for the next 3 years

Revision history for this message
d-arcy (manoka) said :
#5

I'll have to see how much I will have to spend for this solution. I don't suppose my second hard drive is likely to be of any use if connected through an external usb device.
You would definitely not recommend an online download of the 8.04 upgrade?
And there is no way to (re)connect to the internet provider without a computer start or restart?

Revision history for this message
Theodotos Andreou (theodotos) said :
#6

If you have a second disk you do not need to connect it externally. The livecd includes ntfs-3g which can backup your data to the second disk.

You need ti find the logical name of the first and second disk with "lshw" (usually it is /dev/sda and /dev/sdb). The partitions on them should be sda1 and sdb1 respectively

Then mount them:

mkdir /mnt/disk-source
mkdir /mnt/disk-destination

mount -t ntfs-3g /dev/sda1 /mnt/disk-source
mount -t ntfs-3g /dev/sdb1 /mnt/disk-destination

And copy the data:

cp -ar /mnt/disk-source/<whatever path> /mnt/disk-destination/<backup folder>

I believe that a fresh install will result in a stable system but you can try your luck with an online upgrade to 8.04

Revision history for this message
d-arcy (manoka) said :
#7

Thanks,
I entered "mkdir /mnt/disk-source" in the terminal and got the following response:
 "mkdir: cannot create directory `/mnt/disk-source': Permission denied"

Revision history for this message
Theodotos Andreou (theodotos) said :
#8

Try "sudo -i" first to become root

Revision history for this message
d-arcy (manoka) said :
#9

After:

mkdir /mnt/disk-source
mkdir /mnt/disk-destination
mount -t ntfs-3g /dev/sda1 /mnt/disk-source

I got the following response:

NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?

Revision history for this message
Theodotos Andreou (theodotos) said :
#10

Try this on both drives:

sudo cfdisk /dev/sda
sudo cfdisk /dev/sdb

This way you will see which is the correct name of the ntfs partitions on both drives and use those instead.

Revision history for this message
d-arcy (manoka) said :
#11

The results are:

  cfdisk (util-linux-ng 2.13)

                              Disk Drive: /dev/sda
                        Size: 20020396032 bytes, 20.0 GB
              Heads: 255 Sectors per Track: 63 Cylinders: 2434

    Name Flags Part Type FS Type [Label] Size (MB)
 ------------------------------------------------------------------------------
    sda1 Boot Primary Linux ext3 19140.23
    sda5 Logical Linux swap / Solaris 880.11

and:

 cfdisk (util-linux-ng 2.13)

                              Disk Drive: /dev/sdb
                       Size: 300069052416 bytes, 300.0 GB
             Heads: 255 Sectors per Track: 63 Cylinders: 36481

    Name Flags Part Type FS Type [Label] Size (MB)
 ------------------------------------------------------------------------------
    sdb1 Boot Primary Linux ext3 [/] 298133.50
    sdb5 Logical Linux swap / Solaris 1932.95

  [Bootable] [ Delete ] [ Help ] [Maximize] [ Print ]
     [ Quit ] [ Type ] [ Units ] [ Write ]

                 Toggle bootable flag of the current partition

So which would be the correct name of the ntfs partitions?

Revision history for this message
Theodotos Andreou (theodotos) said :
#12

So you do not have Windows partitions. Did you choose to erase Windows Completely?

Anyway if you have data on sda1 you can mount it up with

mount -t ext3 /dev/sda1 /mnt/disk-source

ALso mount the destination drive

mount -t ext3 /dev/sdb1 /mnt/disk-destination

and copy the data you need from /mnt/disk-source to /mnt/disk-destination using the "cp" command as above.

Note that if you need to have windows installed you will need to install Windows first and then install Ubuntu.

Revision history for this message
d-arcy (manoka) said :
#13

With the "cp" command as above, do I have to enter it just as you stated it, or do I have to alter it and somehow specify the exact files or folders which I want to backup?
What I thought that might be best to do, is to erase whatever there's on sdb, then to move the files of the "Home folder" and from the "Desktop" from sda to sdb. Or should or can I backup or move the installed software and any settings too, like e.g. for the internet connection?
And no, I didn't have any windows partitions. I erased it because this computer was given to me used, and as it seemingly had an illegal windows copy installed, eventually ceased to function.

Revision history for this message
Theodotos Andreou (theodotos) said :
#14

If you do :

cp -ar /mnt/disk-source/home/<username> /mnt/disk-destination/bak

It will copy everything under your home directory (including settings) to the bak folder in destination drive.

Revision history for this message
d-arcy (manoka) said :
#15

I guess when I enter:

cp -ar /mnt/disk-source/home/<username> /mnt/disk-destination/bak

I'm supposed to replace the "<username>" with my actual username.

Shouldn't I get any response after that? As nothing seems to be happening.

And when I do the upgrade, would it be recommendable to temporarily (physically) disconnect the sdb hard drive for safety reasons?

Revision history for this message
d-arcy (manoka) said :
#16

Now I got:

root@<username>-desktop:~#

I suppose this means that it is done successfully.

Revision history for this message
Theodotos Andreou (theodotos) said :
#17

Yes. You can verify that the data is copied by browsing to the destination folder. "cd" and "ls -la" command can come handy for that.

Revision history for this message
d-arcy (manoka) said :
#18

It looks good - I checked out the contents in Places > Computer > disk (it reads still just "277.7 GB Volume"), but all the files and folders seem to be there in a folder called "bak" - I can't see any settings though.
There are lots of other folders in it also, which I don't know what they are all about, as when I installed Ubuntu, I programed to install it only on the sda drive, yet it seems that the second drive was formatted too.

So should I start a new thread, or can you answer me the question about a possibility to connect or reconnect manually to the internet while logged in?
And when I do the upgrade, would it be recommendable to temporarily (physically) disconnect the sdb hard drive for safety reasons?

Revision history for this message
Theodotos Andreou (theodotos) said :
#19

The settings are all those hidden files and folder. Hidden are the files/folders that start with a dot. Every program keeps its own setting in one such file or folder.

No need for new thread.

I did not understand your question about internet connectivity. What do you want to do exactly?

Regarding the second drive you can do the manual partition setup and unclick the "format" option or remove it during installation.

Revision history for this message
d-arcy (manoka) said :
#20

Actually I can't see any files/folders in the sdb that start with a dot. I also wonder why I'm unable to delete the folders which were already there, which seem of no use to me.

Anyway, what I would like to know about the possibilities to establish a connection to the internet is: Whether I just booted up the computer or whether the connection got cut off during a session while surfing on the internet, why does the computer only connect when I reboot it, why does it not automatically try to (re)connect, and is there no other way to (re)connect, like e.g. manually (other than automatically)?

Sorry for taking up so much of your time.

Revision history for this message
Theodotos Andreou (theodotos) said :
#21

This is why I suggested to do a fresh install in the hope that this problem will go away. If 7.04 was working fine so should 8.04. Try and see if the problem is solved with a new installation.

Revision history for this message
d-arcy (manoka) said :
#22

Okay, then thanks so much for your efforts and patience!