Find the answer to your Linux question:
Results 1 to 6 of 6
I have dual-boot WinXP and Karmic. When I start an Ubuntu session, I'm presented with the tty1 login console rather than the GUI. "startx" does not work. My Ubuntu experience ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Location
    Highlands
    Posts
    37

    Why does /etc restore cause tty1 to appear at startup?

    I have dual-boot WinXP and Karmic.

    When I start an Ubuntu session, I'm presented with the tty1 login console rather than the GUI. "startx" does not work.

    My Ubuntu experience is only one month old. So I've only a few of my own files. These are backed up to external HDD.

    As part of my "disaster recovery" planning, I've done several reinstalls of Ubuntu, followed by several restores of external HDD backups.

    Here is a typical re-install sequence:

    • Re-install. Reboot. All OK.
    • Install automatic updates. Reboot. All OK.
    • Use grsync to restore /etc from HDD backup.
    • Reboot. This is when I get the tty1 login screen.

    Why is the /etc restore causing the tty1 screen to launch, rather than the GUI?

  2. #2
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    /etc is the system wide settings.

    How was the backup performed? Are you sure it was the /etc from the hard drive and not one from a CD? What was the default init level when you made that backup?

    Log in and check /etc/inittab for the id line
    Code:
    # The default runlevel is defined here
    id:5:initdefault:
    If you can't use startx either once you've logged in from text, it's likely your /etc backup is wrong or damaged. You'd be better off leaving a base install and reconfiguring what few system wide configurations need to be by hand. If it's a more complicated setup like Samba, see if you can isolate only that directory or file(s) from the backup and not overwrite the whole /etc (I know you're attempting this with (g)rsync, but that appears to have backfired).

    Also, I just came to the realization that you used a backup to another drive. What is the filesystem type on that drive? I ask because if you are using rsync (or even a basic copy) to a non-posix file system, then the permissions are not being stored. It's very possible that all the information/settings in the files are correct, but no user can read them, making them unusable to anyone other than root.

    Try booting in single user (recovery console) and check ls -l in /etc and look at the permissions. Most files should be rw-r--r-- (with some exceptions for security reasons). If you find they are all rwx------ , then that is your problem.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Location
    Highlands
    Posts
    37
    Linux forum /etc

    Thanks for the detailed response

    Quote Originally Posted by D-cat View Post
    How was the backup performed? Are you sure it was the /etc from the hard drive and not one from a CD?
    Definitely the hard drive. I used grsnyc, which allows you to browse to the source and destination. The source was:
    /etc/

    What was the default init level when you made that backup?
    I have no "inittab":

    :/etc$ locate inittab
    /usr/lib/upstart/migrate-inittab.pl
    /usr/share/man/man5/inittab.5.gz

    My Ubuntu book says use "runlevel"

    :/etc$ runlevel
    N 2

    I've never changed that.

    You'd be better off leaving a base install and reconfiguring what few system wide configurations need to be by hand.
    Well. If it's only a few reconfigurations, I suppose you're right

    However, my problem is that if I change anything, or add anything from Synaptic Package Manager, I'm too new to know where these things are causing changes in my filesystem. I've seen a lot of things in /home. That's one of the directories that I back up using grsync. The complete list is:

    /home
    /etc
    /usr/local
    /var

    What is the filesystem type on that (HDD) drive?
    NTFS

    ...if you are using rsync (or even a basic copy) to a non-posix file system, then the permissions are not being stored.
    HDD typical permissions for /etc:

    rwx rwx rwx

    Laptop typical permissions for /etc:

    rwx r-x r-x

    I looked in grsync options. I had the option to preserve permissions while backing up but I don't think I checked it. On the other hand, when restoring I DID select "Preserve permissions", so the laptop permissions after restore would have been:

    rwx rwx rwx

    (Of course, they are now back to normal, because I re-installed Ubuntu just before making the original post.)

    Thanks again for you help

  4. #4
    Just Joined!
    Join Date
    Dec 2009
    Location
    Highlands
    Posts
    37
    Quote Originally Posted by D-cat View Post
    ...if you are using rsync (or even a basic copy) to a non-posix file system, then the permissions are not being stored. It's very possible that all the information/settings in the files are correct, but no user can read them, making them unusable to anyone other than root.
    You're correct

    The HDD was partitioned in NTFS.

    So I used gParted to create an ext4 partition on the HDD. Now, an /etc rsync does not damage my configuration.

    Thanks for the help

  5. #5
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    Good. In the future, you may want to consider doing your backups with tar (or dar), which is very much like backing up to a zip file, but all the posix permissions are also stored in the file. This would allow you to safely store the backups on a non-posix filesystem or media (like CD-R).

  6. #6
    Just Joined!
    Join Date
    Dec 2009
    Location
    Highlands
    Posts
    37
    Quote Originally Posted by D-cat View Post
    Good. In the future, you may want to consider doing your backups with tar (or dar), which is very much like backing up to a zip file, but all the posix permissions are also stored in the file. This would allow you to safely store the backups on a non-posix filesystem or media (like CD-R).
    Thanks for the suggestion, and the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...