Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi, I had some issues with Wubi installations of Ubuntu, so I figured out how to create a LiveCD and to install from the CD. I am working on Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    30

    Linux install works, can't access Windows as before


    Hi,

    I had some issues with Wubi installations of Ubuntu, so I figured out how to create a LiveCD and to install from the CD. I am working on Linux now and I am having no issues as far as the Penguin goes. I hash-checked the iso and used older CDs more suited for booting.

    I chose to install from the CD, and I selected the option which partitions and installs Linux alongside Windows. I was prompted to import some user folders from my Windows Vista, and I agreed. These appeared in Linux and also work fine.

    However, after a few hours of messing with my new Linux, I restarted and I realized all I have in my boot menu now are some Linux options, memory test, and a Vista loader & vista recovery. I had intended to have a dual boot system. Did I delete my Windows without meaning to, or can I change the bootloading process somehow to include both Linux and Vista?

    Upon selecting the Vista Loader, I was asked if I wanted to recover my files, etc. I refrained because I wasn't sure what the effect would be on Linux. Is there a way to have both Vista and Linux show up normally in my boot menu, or will I have to go back and forth recovering every time I chose to use the other OS?

    The only reason I still want to use Windows occasionally is because I had Maple software in Windows which was useful for school.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    We have to check partition structure of your Hard disk and contents of GRUB Configuration file. Which version of Ubuntu are you using?
    Post the output of sudo fdisk -l command here.
    Code:
    sudo fdisk -l
    * Its small L in fdisk -l.
    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!
    Join Date
    Apr 2010
    Posts
    30
    Output of sudo fdisk -l

    Code:
    Disk /dev/sda: 640.1 GB, 640135028736 bytes
    255 heads, 63 sectors/track, 77825 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x6e13f79f
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1828    14680064   27  Unknown
    /dev/sda2   *        1828       39827   305223680    7  HPFS/NTFS
    /dev/sda3           39827       59426   157430228    7  HPFS/NTFS
    /dev/sda4           59426       77826   147795969    5  Extended
    /dev/sda5           59426       77074   141753344   83  Linux
    /dev/sda6           77074       77826     6041600   82  Linux swap / Solaris
    
    Disk /dev/sdd: 1031 MB, 1031798784 bytes
    16 heads, 32 sectors/track, 3936 cylinders
    Units = cylinders of 512 * 512 = 262144 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd42da6b7
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1   *           1        3936     1007600    e  W95 FAT16 (LBA)
    From uname -r, I got:

    2.6.32-22-generic

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Post the version of Ubuntu. If it is 9.04 or earlier, it uses Grub Legacy. If it is 9.10 or later, it uses Grub2 and the methods and files are different. The uname command gives the kernel version. Look in the /etc directory for a file named issue or release and that should tell you.

  5. #5
    Just Joined!
    Join Date
    Apr 2010
    Posts
    30
    I am on Ubuntu 10.04 LTS

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    You're using Grub2. I'm not familiar with it, it is still beta software. You most likely need to boot sda2. You could use the search function here at Linux Forums or google "dual-boot with Grub2". You need to run update Grub after making changes and the methodology for Grub2 is totally different than Grub Legacy. Good Luck.

  7. #7
    Just Joined!
    Join Date
    Apr 2010
    Posts
    30
    Thanks, I am reading up on grub2 now. I have some programming experience, and I have a rough sense of what grub2 is, but to me this is one of those cases of information overload. I'm not sure where to begin, or what might be the issue behind the scenes. Obviously, I don't want to go changing important system files haphazardly.

    If anyone can offer advice as to whether my problem is fixable through grub2, it would be greatly appreciated.

    EDIT: For example, Grub 2 Basics - Ubuntu Forums.

    I see there's a section on adding things to boot menu, but how can I know if I've accidentally corrupted my Vista partition, or how to reference it in the process of trying to add it/find it in my grub files?

    If it matters, Vista was installed first, and I defragged before running the Ubuntu LiveCD I made. No error messages came back.

    I don't know how to interpret the code I posted above as my first reply. Can anyone tell if my Vista is intact on the computer?

  8. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    This should be very easy to do with Grub2. With Grub Legacy, it would just be adding an entry in your menu.lst file.

    Here's a link to a very detailed tutorial GRUB 2 bootloader - Full tutorial. I would check out section 4 B, 4 C.

    I doubt if you corrupted your vista partition. It seems you either don't have an entry in Grub for vista or you have an incorrect entry for some reason. Your windows partitions are still there (taking up two thirds of your hard drive) as you can see by the fdisk output. I'm surprised Ubuntu Grub didn't detect vista.

    You could check your vista folders/files by mounting them in Ubuntu and looking to see if files/folders are there.

    You might also post your grub.cfg file so someone who is familiar with Grub2 would be able to advise.

  9. #9
    Just Joined!
    Join Date
    Apr 2010
    Posts
    30
    I looked at the link provided, but under the sections where it deals with Windows 7/Ubuntu dual boot, all it says is to try booting in and "see if it's fine". In the actual boot-menu, I have entries

    Windows Loader (on dev/sda1)
    Windows Recovery Environment (on dev/sda2)

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
      set saved_entry=${prev_saved_entry}
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z ${boot_once} ]; then
        saved_entry=${chosen}
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
    }
    insmod ext2
    set root='(hd0,5)'
    search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    insmod ext2
    set root='(hd0,5)'
    search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    set locale_dir=($root)/boot/grub/locale
    set lang=en
    insmod gettext
    if [ ${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	linux	/boot/vmlinuz-2.6.32-22-generic root=UUID=1f7aae13-567b-4844-bcf7-2c8353a2a81c ro   quiet splash
    	initrd	/boot/initrd.img-2.6.32-22-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	echo	'Loading Linux 2.6.32-22-generic ...'
    	linux	/boot/vmlinuz-2.6.32-22-generic root=UUID=1f7aae13-567b-4844-bcf7-2c8353a2a81c ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.32-22-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=1f7aae13-567b-4844-bcf7-2c8353a2a81c ro   quiet splash
    	initrd	/boot/initrd.img-2.6.32-21-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	echo	'Loading Linux 2.6.32-21-generic ...'
    	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=1f7aae13-567b-4844-bcf7-2c8353a2a81c ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.32-21-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set 1f7aae13-567b-4844-bcf7-2c8353a2a81c
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows Vista (loader) (on /dev/sda1)" {
    	insmod ntfs
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set 64c451c9c4519ddc
    	chainloader +1
    }
    menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" {
    	insmod ntfs
    	set root='(hd0,2)'
    	search --no-floppy --fs-uuid --set 2864b3a864b37762
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    I have made no changes to the grub.cfg file.

    In this link: Grub/XP/Vista Bootloader - Ubuntu Forums

    There is advice telling me to download a Vista Recovery Disk (my comp came with no disks). What about the Windows Recovery Environment option in the boot menu? Are these the same thing? The relevant portion of the article states that "you will be left with your Windows Vista/7 Bootloader." Does this mean I will lose access to Linux, or that Windows should appear on the menu I have now? In short, will this allow me to dual boot as desired, or is it a way to get back to Vista "at all costs"?

  10. #10
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I have a computer which has windows 7 on it. It came pre-installed. It had three partitions, a boot, a filesystem and a recovery partition. I notice your computer has two ntfs (windows) partitions and one unknown which probably is a boot partition. sda1 is by far the smallest partition so I would expect that to be a boot partition but I don't know. sda2 is much larger than sda3 so I would expect sda3 to be the recovery partition but again, I don't know.

    I don't have any experience with Grub2 so I can't advise on that. You should be able to create a Recovery CD which will enable you to boot into the Recovery partition on the hard drive. As I recall, my Recovery CD was only about 250MB (not sure about that).

    What happens when you select the windows loader option on your menu?

    If you can't get any help with Grub2, you might go to neosmart technologies and download a CD called EasyBCD and burn it to disk. It can manipulate vista/win 7 bootloader and can modify the bootloader to include Linux entries and boot to Linux.

    Not sure what else to suggest.

Page 1 of 2 1 2 LastLast

Posting Permissions

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