LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2008, 08:45 PM   #1
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Rep: Reputation: 0
My Partition is not there!


Hi ... I had Ubuntu 7.10 on a 30 GB Partition and OpenSUSE on a 23 GB Partition. I wanted more space on Ubuntu, and so I uninstalled OpenSUSE. I then tried to boot and my computer said there was no active partition. I installed CentOS 5 on the 23 GB Partition to see if I could fix it.

When I reboot, only CentOS 5 shows up. It says I only have 23 GB. The Ubuntu partition doesn't show up anywhere. I would like to have Ubuntu only, with my current partition, and have it take up all of my diskspace.

I have most of it backed up though, except for the programs I had installed via Synaptic. I would really rather not reinstall Ubuntu.

I was booting through the OpenSUSE GRUB loader ... did I break it??
 
Old 01-04-2008, 08:58 PM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,


From CentOS, could you post the output of?:
Code:
fdisk -l

How did you erase SuSE? Just to know if the method you used could damage in someway the other partition..

I could guess that SuSE was the primary boot on the grub and since you erased you got the error, but that's just a guess.




Regards

Last edited by Acron_0248; 01-04-2008 at 09:00 PM.
 
Old 01-04-2008, 09:53 PM   #3
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Fdisk is a Windows command. I did try it, just to make sure, but it said command not found. To uninstall OpenSUSE I deleted it's partition in GParted on Ubuntu.
 
Old 01-04-2008, 10:18 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
fdisk is also a Linux command - in Linux it's useful. Centos is derived from Redhat, and carries a lot of the deadrat baggage. Try
Code:
/sbin/fdisk -l
If you merely deleted the partition, is that a BIOS message ???.
 
Old 01-05-2008, 03:09 AM   #5
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Well, when I type in only

Code:
fdisk
It doesn't work ... when I typed in

Code:
/sbin/fdisk
it printed out

Code:
/sbin/fdisk: invalid option -- 1

Usage: fdisk [-b SSZ] [-u] DISK     Change partition table
       fdisk -l [-b SSZ] [-u] DISK  List partition table(s)
       fdisk -s PARTITION           Give partition size(s) in blocks
       fdisk -v                     Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
Here is the complete dialog I have:

Code:
[Myname@localhost ~]$ /sbin/fdisk -1
/sbin/fdisk: invalid option -- 1

Usage: fdisk [-b SSZ] [-u] DISK     Change partition table
       fdisk -l [-b SSZ] [-u] DISK  List partition table(s)
       fdisk -s PARTITION           Give partition size(s) in blocks
       fdisk -v                     Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
[Myname@localhost ~]$ fdisk
bash: fdisk: command not found
[Myname@localhost ~]$ fdisk -l
bash: fdisk: command not found
[Myname@localhost ~]$ /sbin/fdisk -l
[Myname@localhost ~]$
 
Old 01-05-2008, 03:41 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Lower case ell (for list), not the digit one - as you apparently tried in your last attempt.
Bloody stupid restriction. Try it as
Code:
sudo fdisk -l
Gawd I hate redhat ...
 
Old 01-05-2008, 04:16 PM   #7
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Code:
Myname@localhost ~]$ sudo fdisk -1
Password:
Sorry, try again.
Password:
Myname is not in the sudoers file.  This incident will be reported.
I don't like it either really, which is why I want Ubuntu back. I don't have the Ubuntu install CD handy so I downloaded a new ISO and I'm about to burn a CD and try the rescue function. I'll post back if it works.
 
Old 01-05-2008, 08:03 PM   #8
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Alright. I'm now in Ubuntu with the Live CD. I have used GParted to delete the CentOS 5 Partition, and increase the size of the Ubuntu partition. I ran a check on it as well.

I typed in

Code:
sudo fdisk -l
and I got

Code:
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 58.5 GB, 58506416640 bytes
255 heads, 63 sectors/track, 7113 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004c020

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6817    54757521   83  Linux
/dev/sda2            6818        7113     2377620    5  Extended
/dev/sda5            6818        7113     2377588+  82  Linux swap / Solaris
I think I know the problem now though -- GParted says the filesystem isn't mounted.

I mounted it in Nautilus and I could poke around in my system.

In GParted, it now says it is mounted at

Code:
/media/disk
I am going to reboot and see if it works now.
 
Old 01-05-2008, 08:20 PM   #9
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Well, at first it looked promising. I got a GRUB boot loader.

It was just text, and it printed out the introduction and then
'grub>'

I put in the boot command and got told that the kernel was not loaded. I booted back to the CD and brought up GParted again. It says my partition is not mounted.

Last edited by FlamingMuffin; 01-05-2008 at 08:24 PM.
 
Old 01-05-2008, 09:36 PM   #10
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
While using the gparted livecd and assuming that it keeps saying that the partition is at /media/disk, open a console and try this:

Code:
sudo chroot /media/disk
Then:

Code:
sudo grub-install (hd0)
That should recreate the grub on the MBR of the disk



Regards
 
Old 01-06-2008, 05:05 PM   #11
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Acron_0248 View Post
While using the gparted livecd and assuming that it keeps saying that the partition is at /media/disk, open a console and try this:

Code:
sudo chroot /media/disk
Then:

Code:
sudo grub-install (hd0)
That should recreate the grub on the MBR of the disk



Regards

Code:
ubuntu@ubuntu:~$ sudo chroot /media/disk
root@ubuntu:/# sudo grub-install (hd0)
bash: syntax error near unexpected token `('
 
Old 01-06-2008, 05:25 PM   #12
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hmmm....I'd read about similar problems on the bugtrack of ubuntu but I can't find it =/


Anyway, try with any of this options (whatever of this options you choose, A or B or C is to be executed after the chroot like you did before):

A)
Code:
# sudo grub-install hd0
b)
Code:
# sudo grub-install /dev/sda
c)
Code:
# sudo grub
grub> find /boot/grub/stage1
This should gives you a name like: (hd0,x) where 'x' will be a number, then you issue this command, replacing the x by the number the console gives you:
Code:
grub> root (hd0,x)
grub> setup (hd0)
grub> quit
Restart the system and check if grub works

The 'grub>' is what you gonna see at the console, is not for you to type it



Regards
 
Old 01-06-2008, 05:44 PM   #13
FlamingMuffin
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Acron_0248 View Post
Hmmm....I'd read about similar problems on the bugtrack of ubuntu but I can't find it =/


Anyway, try with any of this options (whatever of this options you choose, A or B or C is to be executed after the chroot like you did before):

A)
Code:
# sudo grub-install hd0
b)
Code:
# sudo grub-install /dev/sda
c)
Code:
# sudo grub
grub> find /boot/grub/stage1
This should gives you a name like: (hd0,x) where 'x' will be a number, then you issue this command, replacing the x by the number the console gives you:
Code:
grub> root (hd0,x)
grub> setup (hd0)
grub> quit
Restart the system and check if grub works

The 'grub>' is what you gonna see at the console, is not for you to type it



Regards
A:
Code:
root@ubuntu:/# sudo grub-install hd0
/dev/sda1: Not found or not a block device.
B:
Code:
root@ubuntu:/# sudo grub-install /dev/sda
/dev/sda: Not found or not a block device.
C:
Code:
       [ Minimal BASH-like line editing is supported.   For
         the   first   word,  TAB  lists  possible  command
         completions.  Anywhere else TAB lists the possible
         completions of a device/filename. ]

grub> find /boot/grub/stage1

Error 15: File not found
 
Old 01-06-2008, 06:11 PM   #14
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Are you sure that you're using those command after the chroot?

I mean:
Code:
# sudo chroot /media/disk
# sudo grub-instal .... or B or C

Can you post the output of?:
Code:
ls /media/disk/boot/grub

(Assuming that /media/disk is where the partition is mounted)




Regards
 
Old 01-06-2008, 08:10 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Try it without the "/boot"
Code:
find /grub/stage1
Proceed as per above.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 06:55 PM
Copy files from partition to partition too slow, SATA hard disk.What should I do£¿ Ryanlee SUSE / openSUSE 20 10-31-2005 07:30 AM
Deleted ntfs partition - added linux partition in its place - corrupt! eklhad Linux From Scratch 2 06-28-2005 01:31 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration