1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linux Root problems...

Discussion in 'Software' started by Lazlow, 26 Sep 2005.

  1. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    I'm very new to linux, so new that I've only really logged into my Ubuntu install 3 times - I've not had the time to mess about with it all.

    I need help from those more experienced with Linux:

    I'm trying to change the grub boot order, as at the moment the Ubuntu is the default boot, and it only hangs a few seconds in grub before it begins booting it. I'm trying to make my XP Pro install the primary boot, so that I don't need to sit by the keyboard every time my PC boots, just to select Windows.

    So, I log into Ubuntu under my username/password. Navigate to filesystem>boot>grub>menu.lst

    It looks as though I need to change the following lines:
    to:
    Where hd(0,2) is my Ubuntu install and hd(0,0) is Windows.

    Is this correct? If so, can someone tell me how I'm meant to change the file, as it's read only. So I go to login as root, and the default login screen says I cannot login as root there. So I boot into the command line or whatever Ubuntu, and login as root. But that's about as far as my knowledge gets me.

    If my hd0,0 part is correct, how do I alter the file, as root it seems is the only user who can alter it.

    Sorry for the confusion, it's the best I can explain it. Linux is very slick, it's just difficult to get used to when you've been on Windows since 3.1...
     
  2. BjD

    BjD What's a Dremel?

    Joined:
    10 Apr 2003
    Posts:
    935
    Likes Received:
    0
    Not quite, there should be a line in near the top defining the default menu item to boot. Mine is:

    Code:
    #default listing to boot
    default 0
    
    # timeout in secs
    timeout 10
    Counts from 0 btw ;) The line line you refer to defines where grub looks for the root filesystem for Ubuntu, and you don't want to change it ;) Root should be the only user who can modify it i think.
    I should point out that I've not used Ubuntu, and I've always modified grub.conf, not menu.lst. I'm still a novice user so not sure quite what menu.lst does :)
     
  3. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    Ah, I'll look for that line instead then. Do you know how I log into Root and alter the file? As I don't have a friggin' clue.
     
  4. BjD

    BjD What's a Dremel?

    Joined:
    10 Apr 2003
    Posts:
    935
    Likes Received:
    0
    Best way is to use 'su' on the command line, which gives your user root priveliges (assuming they're in the wheel group, which I assume Ubuntu will have setup?). Otherwise use CTRL+ALT+F1 which gives you a login prompt, and login as 'root' there. Then use a command-line text editor (nano, vi etc) to edit the file.
    If you use a login manager (ie you have a nice colour graphical screen when you login) you may be able to login as root there, and edit the file in whatever desktop you're using. Best to log back out once you're done.
     
  5. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    Thanks! Will give all that a go and report back if it's a success or not...
     
  6. Zidane

    Zidane What's a Dremel?

    Joined:
    27 Apr 2004
    Posts:
    688
    Likes Received:
    0
    as an fyi, if your using ubuntu, it doesnt use a 'real' root system, its a distro designed for beginners. you can get root acces by using the su command, which is preconfigured for ubuntu.

    /me grumbles, cause he really doesnt like ubuntu.
     
  7. simon w

    simon w What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,302
    Likes Received:
    0
    su doesn't work unless you've manually set a root password using passwd

    (it didn't for me anyway)
     
  8. AdeTBun

    AdeTBun What's a Dremel?

    Joined:
    18 Jun 2003
    Posts:
    111
    Likes Received:
    0
    Although the Ubuntu forums advise against it you can activate root access and login as root by making a few changes. First you need to set a password for root access by opening a terminal and typing sudo passwd root and entering your user password when prompted for a password and then setting a new password for root. Next type SU (I believe that Ubuntu also uses Sudo for this but SU works too) and enter the new root password. Now run the login settings setup from the terminal (quickest way I've found of doing this is to create a shortcut to the launcher on the desktop then just copy the launcher command into the terminal) and change the security setting to allow login as root. Sure lots of people say that this compromises security but other distros allow root access as default so I really don't see what the problem is.

    Good luck.

    Ade
     
  9. BBurger

    BBurger What's a Dremel?

    Joined:
    7 Apr 2005
    Posts:
    155
    Likes Received:
    0
    You should be able to just use "sudo" to access root owned files, without messing around with su, root passwords, or any of the rest of that.

    "sudo gedit <path & name of file>" works nicely to get at those root-owned conf files.

    https://wiki.ubuntu.com/RootSudo for more information.
     
Tags:

Share This Page