LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Classic grub problem (https://www.linuxquestions.org/questions/linux-newbie-8/classic-grub-problem-739654/)

suvirj 07-13-2009 12:09 AM

Classic grub problem
 
Hello, this seems like a classic grub problem.

I had a Ubuntu Jaunty and Vista on dual-boot. Got a special Ubuntu Fiesty LiveCd with a book. I installed the Ubuntu Fiesty on a seperate partition and NOW my new grub (changed by Fiesty) does list Ubuntu 9 and Vista. But I am not able to load the Ubuntu 9. Apparently there is a "Error 2:Bad file or directory type".Vista loads fine.

I read few other forums and saw something about a 256-bit inode. But what exactly should I do to fix it? I don't want to end up with a machine that cant load any of the installed OS.

Thanks for any help!

Additional Info:
I went to the grub menu in my terminal and tried "find (hd0,7)" since my ubuntu9 is on sda8 and it returned "File not found".

jschiwal 07-13-2009 12:28 AM

When you said `grub menu', did you mean the grub shell?

I think you need to determine whether something happened to your Ubuntu 9's partition. Another possibility is that the partitions have changes. E.G. /dev/sda7 -> /dev/sda8. From Ubuntu Fiesty, look at the partition that has Ubuntu 9 on it. See if you can mount it manually. If you can, you can fix up the /boot/grub/menu.lst file and the /etc/fstab file, and try to boot up to it from the grub menu. Using fdisk, check the type of partition. There is a character in the MBR of a partiton determining the type. Maybe it changed but the filesystem is fine. If that is the case, you can fix it using fdisk.

I don't know what you mean by the 256-bit inode.

What is the filesystem that your old Ubuntu 9 partition uses? Another possibility is that it uses a filesystem that your new grub installation doesn't support. Look at this listing of /boot/grub/ on my laptop:
Code:

ls /boot/grub
default    device.map.old  fat_stage1_5  iso9660_stage1_5  menu.lst      minix_stage1_5    stage1  stage2.old    vstafs_stage1_5
device.map  e2fs_stage1_5  ffs_stage1_5  jfs_stage1_5      menu.lst.old  reiserfs_stage1_5  stage2  ufs2_stage1_5  xfs_stage1_5

The *_stage1_5 files are what supply support for the different filesystems. If you used xfs on Ubuntu 9, but you don't have the /boot/grub/xfs_stage1_5 file, grub won't understand the xfs filesystem.

syg00 07-13-2009 01:03 AM

Very likely the inode change is causing the problem - Jaunty will have a patched grub, and you just trashed it. See here for some background.
Simplest would be to use the Jaunty loader again - from a Feisty terminal
Code:

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

You'll need to add a stanza from the Feisty menu.lst to the Jaunty menu.lst to get all your systems in the boot menu.

suvirj 07-13-2009 01:26 AM

@jschiwal : My ubuntu9 is on sda8[ext3, confirmed by GNOME partition editor] and fiesty even loaded it. I even have an icon on my desktop with which I can browse the files in it.

@sig00 : I did what you said, but it returns
________________________________________________
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type
_______________________________________________

So, it appears that my sda8 is fine, how do i boot it now?

[EDIT : I meant syg00]

[EDIT : Pasting a copy of my /etc/fstab in fiesty.

Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
# /dev/sda4
UUID=b08cab64-7c1a-4568-90d0-c889031d1500 /              ext3    defaults,errors=remount-ro 0      1
# /dev/sda1
UUID=0A66AACD66AAB8B9 /media/sda1    ntfs    defaults,nls=utf8,umask=007,gid=46 0      1
# /dev/sda2
UUID=A48054A280547CAC /media/sda2    ntfs    defaults,nls=utf8,umask=007,gid=46 0      1
# /dev/sda5
UUID=D6A1-8292  /media/sda5    vfat    defaults,utf8,umask=007,gid=46 0      1
# /dev/sda6
UUID=D564-036F  /media/sda6    vfat    defaults,utf8,umask=007,gid=46 0      1
# /dev/sda8
UUID=e37b9227-9810-4681-93ae-0fb31c998746 /media/sda8    ext3    defaults        0      2
# /dev/sda7
UUID=37537973-b5ea-4f8a-a2b2-15f82f48d066 none            swap    sw              0      0
/dev/scd0      /media/cdrom0  udf,iso9660 user,noauto    0      0


syg00 07-13-2009 01:49 AM

Is your system still bootable ?. Do you have both the Ubuntu install CDs ?.

suvirj 07-13-2009 01:54 AM

Yes, my system boots. But the bootloader only lets me access fiesty [which installed the present grub] and the Vista. For some reason, it gives error for ubuntu9.

suvirj 07-13-2009 03:44 AM

I did it. Problem solved. I used my Ubuntu 9 live CD and made the Grub installed in sda8 to MBR. All works.
The bright side is that I now know my way around GRUB. Cool!

Thanks for all the suggestions and the help guys!!

archtoad6 08-06-2009 07:05 AM

I hear it's possible for OP to use "Thread Tools" to mark this [solved].


All times are GMT -5. The time now is 11:37 AM.