Find the answer to your Linux question:
Results 1 to 9 of 9
i have installed kubuntu 7.04 and windows xp on my comp. and i want to try debian, so i get debian dvd and installed it on hdb2. the installation was ...
  1. #1
    Just Joined! Runn3r.cze's Avatar
    Join Date
    Jul 2007
    Location
    czech republic
    Posts
    93

    error2: bad file or directory type

    i have installed kubuntu 7.04 and windows xp on my comp. and i want to try debian, so i get debian dvd and installed it on hdb2. the installation was ok, but i restarted my computer grub gave me only this error message:
    Code:
    error2: bad file or directory type
    i even couldn't choose what system i want to mount...

    so i booted system rescue cd and renewed the grub settings from kubuntu and add there the path to debian. now i can normally boot to kubuntu or windows, but when i want to boot debian, i still get the same error.

    what is the problem? could it be caused by the second hard drive/partition???

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Post the output of 'sudo fdisk -l' command and contents of /boot/grub/device.map file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined! Runn3r.cze's Avatar
    Join Date
    Jul 2007
    Location
    czech republic
    Posts
    93
    sudo fdisk -l
    Code:
    Disk /dev/hda: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1        2420    19438618+   7  HPFS/NTFS
    /dev/hda2            2551        4865    18595237+  83  Linux
    /dev/hda3            2421        2550     1044225   82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/hdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdb1   *           1       12749   102406311    7  HPFS/NTFS
    /dev/hdb2           12750       19457    53882010   83  Linux
    /boot/grub/device.map
    Code:
    (hd0)	/dev/hda
    (hd1)	/dev/hdb
    the debian entry in /boot/grub/menu.lst is
    Code:
    title		Debian GNU/Linux, kernel 2.6.18-4-486
    root		(hd1,1)
    kernel		/boot/vmlinuz-2.6.18-4-486 root=/dev/hdb2 ro 
    initrd		/boot/initrd.img-2.6.18-4-486
    savedefault
    
    title		Debian GNU/Linux, kernel 2.6.18-4-486 (single-user mode)
    root		(hd1,1)
    kernel		/boot/vmlinuz-2.6.18-4-486 root=/dev/hdb2 ro single
    initrd		/boot/initrd.img-2.6.18-4-486
    i coppied it from /boot/gurb/menu.lst file generated by debian during installation...

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Remove /boot from kernel and initrd lines.
    Code:
    title		Debian GNU/Linux, kernel 2.6.18-4-486
    root		(hd1,1)
    kernel		/vmlinuz-2.6.18-4-486 root=/dev/hdb2 ro 
    initrd		/initrd.img-2.6.18-4-486
    savedefault
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined! Runn3r.cze's Avatar
    Join Date
    Jul 2007
    Location
    czech republic
    Posts
    93
    Quote Originally Posted by devils_casper View Post
    Remove /boot from kernel and initrd lines.
    Code:
    title		Debian GNU/Linux, kernel 2.6.18-4-486
    root		(hd1,1)
    kernel		/vmlinuz-2.6.18-4-486 root=/dev/hdb2 ro 
    initrd		/initrd.img-2.6.18-4-486
    savedefault
    it doesn't help... when i do it, i get another error
    Code:
    error 15: file not found
    i can't remove /boot from it, because the files are stored in /boot direcotry

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Check the contents of Debian's /boot folder. Does it have vmlinuz-2.6.18-4-486 file?

    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined! Runn3r.cze's Avatar
    Join Date
    Jul 2007
    Location
    czech republic
    Posts
    93
    yes, i've already checked it and the files are there...

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    error2: bad file or directory type
    GRUB throws this error in two cases only.
    File doesn't exist OR If its a symlink instead of actual file.

    Check the output of ls -l command. vmlinuz-2.6.18-4-486 should be a actual file not a symlink.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #9
    Just Joined! Runn3r.cze's Avatar
    Join Date
    Jul 2007
    Location
    czech republic
    Posts
    93
    this is the outpup of ls -l in debian /boot directory
    Code:
    -rw-r--r-- 1 root root   71818 2007-03-26 18:32 config-2.6.18-4-486
    drwxr-xr-x 2 root root    4096 2007-07-26 21:24 grub
    -rw-r--r-- 1 root root 4346213 2007-07-26 21:01 initrd.img-2.6.18-4-486
    -rw-r--r-- 1 root root  716728 2007-03-27 00:39 System.map-2.6.18-4-486
    -rw-r--r-- 1 root root 1220128 2007-03-27 00:39 vmlinuz-2.6.18-4-486
    it looks same as in ubuntu where it works good

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •