LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Reinstalled Windows, have grub, need UBUNTU back! (http://www.linuxquestions.org/questions/ubuntu-63/reinstalled-windows-have-grub-need-ubuntu-back-647313/)

Ryupower 06-05-2008 07:57 PM

Reinstalled Windows, have grub, need UBUNTU back!
 
hello,I had to reinstall windows and then GRUB was gone. With the LiveCD I did:

>sudo grub
>find /boot/grub/stage1

put the result ( which was hda0,1) in like this:
>setup (hda0)
>quit


I rebooted and my grub menu was there. I selected the Linux kernel I Wanted to boot, but it gave me an error telling me that the device isn't bootable or something like that. So I tried again, tried every one of the ubuntu entries besides the memtest. And I keep on getting a message that says that the partition "can't be mounted".

Is it because I installed ubuntu on a JFS-formatted partition, rather than EXT2/3?


I need some help here, and I'd appreciate it!

Larry Webb 06-05-2008 08:39 PM

sudo fdisk -l and post the results. This will tell us your partition information.

Ryupower 06-05-2008 11:20 PM

The fdisk -l output on the livecd is:
Quote:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 9547 45969997+ 83 Linux
/dev/sda3 9548 9729 1461915 82 Linux swap / Solaris

Disk /dev/sdb: 30.0 GB, 30016659456 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3649 29310561 c W95 FAT32 (LBA)

Larry Webb 06-06-2008 05:13 AM

Use your live cd and type

sudo grub
root (hd0,1)
setup (hd0)

See if this brings it back and if not we will have to look deeper.

Ryupower 06-07-2008 10:10 PM

It was successful, according to the terminal, but when I rebooted, GRUB still said that it couldn't be mounted. :( "Error 17"

irishbitte 06-07-2008 11:53 PM

Ryu, just a question, but looking through the results of fdisk -l, i dont see any mention of a JFS filesystem? Maybe I'm blind?

Where do you have ubuntu installed, sda or sdb (1st or second HDD).

What I am seeing is a FS (sda2) marked 83, which is a Linux partition, but it's not bootable. (no asterisk beside partition in output of fdisk).

I haven't used fdisk in a while, but you need to mark sda2 as bootable! that hopefully will solve your problem.

irishbitte 06-07-2008 11:56 PM

If that doesn't solve your problem, try here:

http://ubuntuforums.org/showthread.php?t=442945

looks good to me!

Ryupower 06-08-2008 12:58 AM

Quote:

Originally Posted by irishbitte (Post 3178024)
Ryu, just a question, but looking through the results of fdisk -l, i dont see any mention of a JFS filesystem? Maybe I'm blind?

Where do you have ubuntu installed, sda or sdb (1st or second HDD).

What I am seeing is a FS (sda2) marked 83, which is a Linux partition, but it's not bootable. (no asterisk beside partition in output of fdisk).

I haven't used fdisk in a while, but you need to mark sda2 as bootable! that hopefully will solve your problem.

How do I get an asterisk there and make it bootable via livecd? Sorry if that is a dumb question.

aus9 06-08-2008 01:02 AM

pls reboot the live cd and click on the icon for sda2 and post your /etc/fstab pls and /boot/grub/menu.lst

if you do not have an icon on the live cd desktop...mount it manually with
Code:

su
mkdir /z
mount -t jfs /dev/sda2 /z

you then use the live cd to navigate to /z/etc/fstab or /z/boot/grub/menu.lst

Ryupower 06-08-2008 01:16 AM

Quote:

Originally Posted by aus9 (Post 3178063)
pls reboot the live cd and click on the icon for sda2 and post your /etc/fstab pls and /boot/grub/menu.lst

if you do not have an icon on the live cd desktop...mount it manually with
Code:

su
mkdir /z
mount -t jfs /dev/sda2 /z

you then use the live cd to navigate to /z/etc/fstab or /z/boot/grub/menu.lst


There's no icon, If I try to mount, I get this notorious message:

ubuntu@ubuntu:~$ sudo mkdir /z
ubuntu@ubuntu:~$ sudo mount -t jfs /dev/sda2 /z
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so



Making me think I did something wrong.

The /etc/fstab is:
unionfs / unionfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda3 swap swap defaults 0 0



the /boot/grub/menu.lst is...completely blank. Doesn't exist?

aus9 06-08-2008 03:47 AM

the /etc/fstab you are showing is the live cd one and what is the name and version of your live cd pls?

2) I made it jfs because you said that is what you used in post 1.

3) lets confirm with the live cd run

fdisk /dev/sda (or hda) ....or run qtparted or run gparted depending on what package is on your live cd....that will tell us what the partition tool thinks of your current partition filesystem

irishbitte 06-09-2008 05:54 AM

Ryu,

Are you using ubuntu as your live cd?

Secondly, you make a partition bootable using fdisk, however, do read alot before using fdisk, since it is possible to screw everything using it!

Thirdly, are you sure you are using jfs? I think maybe it's actually ext3 or ext2, ubuntu formats to ext3 by default.

Ryupower 06-10-2008 02:20 PM

I am using Ubuntu LiveCD, yes.
I didn't use the default setting ( EXT3 ) I chose JFS when installing, to test it, so far I liked it more than the other three I used before ( EXT3,EX2, and ReiserFS ).

using gparted:

http://img382.imageshack.us/img382/6...gpartedoq1.png

aus9 06-10-2008 07:08 PM

since you know how to get into the partition tool....right hand click on sda2 and find the option for flags and check "bootable" and exit.....see if that helps

Ryupower 06-11-2008 01:14 AM

Quote:

Originally Posted by aus9 (Post 3180890)
since you know how to get into the partition tool....right hand click on sda2 and find the option for flags and check "bootable" and exit.....see if that helps

Done, flagged it bootable. Still doesn't boot when I select it: Error 17. :(


All times are GMT -5. The time now is 05:30 PM.