Page 1 of 2

Ubuntu Trouble

PostPosted: Tue Dec 25, 2007 10:05 am
by Shao Feng-Li
I made a Ubuntu Live CD and from that installed it to the HDD. It made a partition so I can dual boot Windows. To make sure everything was working ok... I was in Ubuntu, restarted and booted into XP, then wanted to go back to Ubuntu.

Then I got this: Image

PostPosted: Tue Dec 25, 2007 11:14 am
by Kenshin17
Will it boot at all? Or does it panic no matter what?

PostPosted: Tue Dec 25, 2007 2:09 pm
by Shao Feng-Li
Nope. I think I gotta know a thing or two about Linux to fix this...

PostPosted: Tue Dec 25, 2007 2:18 pm
by Kenshin17
Google the error and see what you get.

PostPosted: Tue Dec 25, 2007 4:13 pm
by Shao Feng-Li

PostPosted: Tue Dec 25, 2007 4:18 pm
by Kenshin17
Wow, that one is beyond my Linux experience....it looks like it might be pointing to the wrong partition.

PostPosted: Tue Dec 25, 2007 4:23 pm
by Shao Feng-Li
It didn't the first time...

Well, this sucks.

PostPosted: Tue Dec 25, 2007 5:01 pm
by Warrior4Christ
Are you even able to boot far enough to edit the mentioned file?

Does it have a OS selector menu thing on startup?

PostPosted: Tue Dec 25, 2007 5:03 pm
by Shao Feng-Li
I do have the OS selector.

PostPosted: Tue Dec 25, 2007 5:35 pm
by Kenshin17
Hm, maybe try and do some research on editing that file. That seems to be what it needs.

PostPosted: Tue Dec 25, 2007 6:26 pm
by Shao Feng-Li
How do I edit that file anyways? XD

Could it have to do with the fact that it updated?

PostPosted: Tue Dec 25, 2007 6:32 pm
by Kenshin17
Might, and I do not know how to edit it. You'll have to Google search to find out how ;)

PostPosted: Tue Dec 25, 2007 6:42 pm
by Shao Feng-Li
Gosh... I don't even know where to start XD I don't even know what a kernel even is yet! XD

PostPosted: Tue Dec 25, 2007 6:59 pm
by Kenshin17
Kernel is the core of the OS, where everything happens. Just google [filename] edit

PostPosted: Tue Dec 25, 2007 8:08 pm
by Warrior4Christ
Would reinstalling it help?

PostPosted: Tue Dec 25, 2007 11:23 pm
by Icarus
I'm assuming you did a pretty basic default installation of ubuntu.


You'll need to reboot into the LiveCD and then mount your hard drive somewhere. For that, you'll need to find out what partition the / is at. Probable choices are /dev/hda1 or /dev/sda1, depending on if your computer uses IDE or SCSI connectors. Anyway, open a terminal and type
Code: Select all
ls /dev/sda
and hit tab a couple of times to see what pops up. Odds are, / is either on the first or second partition (*da1 or *da2).

Once you figure out where it is, (it doesn't hurt anything if you're wrong, so no worries) type:
Code: Select all
cd  # this is just to make sure you'll have permission to do the next step
mkdir <directoryname>
sudo mount /dev/<partition> <directoryname>
At that point, it should ask for the root passwd of the livecd, if it has one. (guess "root" if you need to). After that, if you used GRUB for the bootloader, the file you need to edit is

<directoryname>/boot/grub/menu.lst

You can open it with gedit, though you may need root permissions
Code: Select all
 <sudo> gedit

---OR---

gedit <path>/filename
Most likely what happened is that grub is looking for the root partition on the wrong one. If is, it's not that bad and all you'll need to do is increment/decrement one or two numbers. Second best case is change a couple of file names in menu.lst so the reflect what's actually on your system.

PostPosted: Wed Dec 26, 2007 5:23 am
by Shao Feng-Li
Yeah, I didn't select any special options or anything. It basically installed for me. Thanks Icarus. I'll see if I can do that.

I don't know if my HDD is IDE or SCSI but it is a laptop HHD if that matters.

PostPosted: Wed Dec 26, 2007 6:04 am
by Shao Feng-Li
Icarus wrote:I'm assuming you did a pretty basic default installation of ubuntu.


You'll need to reboot into the LiveCD and then mount your hard drive somewhere. For that, you'll need to find out what partition the / is at. Probable choices are /dev/hda1 or /dev/sda1, depending on if your computer uses IDE or SCSI connectors. Anyway, open a terminal and type
Code: Select all
ls /dev/sda
and hit tab a couple of times to see what pops up. Odds are, / is either on the first or second partition (*da1 or *da2).

Once you figure out where it is, (it doesn't hurt anything if you're wrong, so no worries) type:
Code: Select all
cd  # this is just to make sure you'll have permission to do the next step
mkdir <directoryname>
sudo mount /dev/<partition> <directoryname>
At that point, it should ask for the root passwd of the livecd, if it has one. (guess "root" if you need to). After that, if you used GRUB for the bootloader, the file you need to edit is

<directoryname>/boot/grub/menu.lst

You can open it with gedit, though you may need root permissions
Code: Select all
 <sudo> gedit

---OR---

gedit <path>/filename
Most likely what happened is that grub is looking for the root partition on the wrong one. If is, it's not that bad and all you'll need to do is increment/decrement one or two numbers. Second best case is change a couple of file names in menu.lst so the reflect what's actually on your system.


When I input-
ls /dev/sda

I get-
/dev/sda

And I'm not sure what the replace the <" "> in the code with either.

EDIT: Ok, I tried a little bit...

Code: Select all
ubuntu@ubuntu:~$ ls /dev/sda
/dev/sda
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ ls /dev/sda
sda   sda1  sda3  sda5  sda6 
ubuntu@ubuntu:~$ ls /dev/sda
/dev/sda
ubuntu@ubuntu:~$ cd #
ubuntu@ubuntu:~$ mkdir /media/disk-1
mkdir: cannot create directory `/media/disk-1': File exists
ubuntu@ubuntu:~$ mkdir /dev/sda3
mkdir: cannot create directory `/dev/sda3': File exists
ubuntu@ubuntu:~$ sudo mount /dev/sda3 media/disk-1
mount: mount point media/disk-1 does not exist
ubuntu@ubuntu:~$ sudo mount /dev/media/disk-1 /dev/sda3
mount: special device /dev/media/disk-1 does not exist
ubuntu@ubuntu:~$ sudo mount /dev/sda3 /media/disk-1
mount: /dev/sda3 already mounted or /media/disk-1 busy
mount: according to mtab, /dev/sda3 is already mounted on /media/disk-1
ubuntu@ubuntu:~$ /dev/sda3/boot/grub/menu.lst
bash: /dev/sda3/boot/grub/menu.lst: Not a directory
ubuntu@ubuntu:~$ /media/disk-1/boot/grub/menu.lst
bash: /media/disk-1/boot/grub/menu.lst: Permission denied
ubuntu@ubuntu:~$ sudo mount /dev/sda3 /media/disk-1
mount: /dev/sda3 already mounted or /media/disk-1 busy
mount: according to mtab, /dev/sda3 is already mounted on /media/disk-1
ubuntu@ubuntu:~$



EDIT: Ok. Seems Ubuntu is on SDA3 (ext3) and it's unmounted... And I have no idea how to mount it XD

PostPosted: Wed Dec 26, 2007 8:13 am
by Kenshin17
You need to edit the file like he says, the drives seem to be already mounted.

Look at where he talks about gedit.

PostPosted: Wed Dec 26, 2007 8:35 am
by Shao Feng-Li
That's... not helping me here either XD

PostPosted: Wed Dec 26, 2007 8:40 am
by Kenshin17
You can't use gedit? To edit the file those google posts said to edit?

All you need to do is tell the computer that the third partition containes what it needs. And number three is already mounted.

PostPosted: Wed Dec 26, 2007 9:46 am
by Shao Feng-Li
...

PostPosted: Wed Dec 26, 2007 10:14 am
by Kenshin17
All you have to do is get to the configuation file that tells the kernel where stuff is and change it to indicate the right partition.

Least thats what I am gathering from the posts above. This hase been an enlightening discussion XD

PostPosted: Wed Dec 26, 2007 11:06 am
by Shao Feng-Li
Yeah... The terminology takes time to get used to XD

PostPosted: Wed Dec 26, 2007 11:20 am
by Kenshin17
Judging from what I have read, all you need to do, is access the configuration file, edit it to point to partition three, and then save the changes. Least thats what this all says to me.

PostPosted: Wed Dec 26, 2007 11:27 am
by Shao Feng-Li
Yeah, that seems about it. I've just never done anything like this ever before XD

PostPosted: Wed Dec 26, 2007 11:33 am
by Kenshin17
Me neither. A geeks best friend is Google. Thats how I figure a lot of stuff out XD

PostPosted: Wed Dec 26, 2007 10:07 pm
by Icarus
Personally, I learned a lot about Linux by installing Gentoo.

Mostly, the stuff in <> is where the names you would use vary.

The cd is just to make sure that you were in the home directory and would have permissions to create a new directory. After you get /dev/sda3 mounted on some directory, you can edit the file with:
Code: Select all
cd <directory>
cd boot
cd grub
sudo gedit menu.lst
That way, you get a graphical editor, as opposed to something like emacs or vim.

PostPosted: Thu Dec 27, 2007 9:30 am
by Shao Feng-Li
That sounds simple enough... I'm not sure what you're supposed to name directories and such...

I can't really gather how to mount and crap like that...

PostPosted: Thu Dec 27, 2007 9:38 am
by Shao Feng-Li
So, near as I can tell, SDA3 is mounted on /media/disk (23.5 gig volume partition) if I understand it all right.