LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-29-2017, 03:34 AM   #1
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Rep: Reputation: Disabled
missing Ubuntu after installation of Window 7


i had win7 and ubuntu 13.04 in my laptop. but somehow window7 corroupted and ubuntu working. then i reinstall window and afetr that i am not able to see ubuntu in booting option.

i inserted live ubuntu-cd. i run some commands and mount the linux drive as sda6. now found grub in boot folder. but after that not able to update or configure Grub.

so not able to see the dual boot option. pl. help
 
Old 05-29-2017, 03:53 AM   #2
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

Windows 7 wrote its bootloader over your GRUB in MBR, assuming it is MBR and not UEFI; please correct me if I'm wrong.

Since you boot the live CD and mount your Linux filesystem, half the job is done already. Now you simply have to chroot into your filesystem and install GRUB back to the MBR.

Let us say you mount sda6 at /mnt/ubuntu (this is just an example mount point, you can replace this with your own mountpoint):
Code:
chroot /mnt/ubuntu env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h

grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda
Then you exit the chroot environment and reboot. The grub-mkconfig line will generate a new grub.cfg which contains entries for both Unbuntu and Windows 7. That should do it.
 
1 members found this post helpful.
Old 05-31-2017, 01:18 AM   #3
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
error message

get this error message after running the command:

sudo: unable to resolve host ubuntu /usr/sbin/grub-probe: error: failed to get canonical path of /dev/sda6
 
Old 05-31-2017, 02:01 AM   #4
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by amita_s12 View Post
get this error message after running the command:

sudo: unable to resolve host ubuntu /usr/sbin/grub-probe: error: failed to get canonical path of /dev/sda6
Ok, then maybe, some more steps to get the filesystem right:
Code:
sudo mkdir /mnt/ubuntu
sudo mount -t ext4 /dev/sda6 /mnt/ubuntu
sudo mount -t proc /proc /mnt/ubuntu/proc
sudo mount --rbind /sys /mnt/ubuntu/sys
sudo mount --rbind /dev /mnt/ubuntu/dev
sudo mount --rbind /run /mnt/ubuntu/run

sudo chroot /mnt/ubuntu env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h

grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda
If anything goes wrong, please post the command along with the error message.

All the best.
 
Old 06-01-2017, 01:07 AM   #5
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
sir,
i m using the following commands to start and mount the sda6. am i mounting the right partition? i am not sure. all the commands work as u mentioned in last post except the last one.grub-install /dev/sda.

ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xc3ffc3ff

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 204797951 102295552 7 HPFS/NTFS/exFAT
/dev/sda3 204799998 511997951 153598977 5 Extended
Partition 3 does not start on physical sector boundary.
/dev/sda4 511997952 976771071 232386560 7 HPFS/NTFS/exFAT
/dev/sda5 204800000 208797695 1998848 82 Linux swap / Solaris
/dev/sda6 208799744 511997951 151599104 83 Linux

Disk /dev/sdb: 4098 MB, 4098883584 bytes
2 heads, 63 sectors/track, 63536 cylinders, total 8005632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x002aa5b9

Device Boot Start End Blocks Id System
/dev/sdb1 * 64 8005631 4002784 b W95 FAT32
root@ubuntu:/home/ubuntu#
 
Old 06-01-2017, 05:46 AM   #6
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Does the grub-mkconfig command work? If yes, please post the output of grub-mkconfig line and grub-install line.
 
Old 06-01-2017, 11:56 PM   #7
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
the output of grub-mkconfig is:

root@ubuntu:/# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found initrd image: /boot/initrd.img-3.8.0-19-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
don[/I][/I]e

the out put of grub-install is:

root@ubuntu:/# grub-install /dev/sda1
/usr/sbin/grub-bios-setup: warning: File system `ntfs' doesn't support embedding.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.
 
Old 06-02-2017, 01:14 AM   #8
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Ah, now we have all the relevant information to better address the problem.

Quote:
Originally Posted by amita_s12 View Post
the output of grub-mkconfig is:

root@ubuntu:/# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found initrd image: /boot/initrd.img-3.8.0-19-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
don[/I][/I]e
grub-mkconfig sees all your installs and adds an entry for them in configuration file /boot/grub/grub.cfg. As you can see, it also detects Windows 7. So, we are not far from a working system. The final step would be to install the bootloader in the MBR of your hard disk, which is designated by /dev/sda.

Quote:
Originally Posted by amita_s12 View Post
the out put of grub-install is:

root@ubuntu:/# grub-install /dev/sda1
/usr/sbin/grub-bios-setup: warning: File system `ntfs' doesn't support embedding.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.
And, you can see that you are trying to install the bootloader in /dev/sda1, which does not work since its filesystem is NTFS. So, please correct that. You don't need to run grub-mkconfig again since the config file has been generated already. You just change /dev/sda1 in the above to /dev/sda and it should work.
 
Old 06-03-2017, 12:26 AM   #9
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
The output of grub install /dev/sda is:

root@ubuntu:/# grub-install /dev/sda
/usr/sbin/grub-bios-setup: warning: this LDM has no Embedding Partition; embedding won't be possible.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists
 
Old 06-04-2017, 05:40 AM   #10
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Ah, now we learn something new again about your machine. Your disk uses Logical Disk Manager. I am not familiar with LDM, so I looked around a bit. I am sorry to say that it seems GRUB does not support it.

Since you can boot into the Windows, I suggest you add an entry for Ubuntu in the Windows boot loader itself. Check this out:
http://linuxbsdos.com/2012/07/21/how...ows-boot-menu/
 
Old 06-04-2017, 11:05 AM   #11
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
"Please use EasyBCD with care, it’s a powerful tool that you can either make your life a lot easier or make it rather miserable by letting you shoot yourself in the foot." this quote i found on the link. pl. suggest or is there any other solution?
 
Old 06-05-2017, 01:12 AM   #12
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by amita_s12 View Post
"Please use EasyBCD with care, it’s a powerful tool that you can either make your life a lot easier or make it rather miserable by letting you shoot yourself in the foot."
Of course, powerful software gives you access to the deep roots of the system, so a small mistake can render your system unusable. I understand you don't want to take the risk. Ok, check this out: https://bugs.launchpad.net/ubuntu/+s...2/+bug/1061255. I think workaround 3 should be helpful to you.

Last edited by aragorn2101; 06-05-2017 at 03:20 AM.
 
Old 06-14-2017, 03:50 AM   #13
EthanStark
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Rep: Reputation: Disabled
ou installed Ubuntu on the former Drive D: in Windows. So, it is used by Ubuntu and now has a EXT4 filesystem. As Windows can't show ext4 partition, you can't see that drive.

You can still see that drive by going to the "Disk management" in Windows. That partition should have label "unknown".

To run Disk management, press Start menu and type diskmgmt.msc and Press and hold Shift key and then hit Enter.

Ethan Stark
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
window 7 cum ubuntu installation problem amritpalpathak Linux - Software 5 02-02-2012 08:50 AM
Linux's window missing after being minimized seow_ming Linux - General 6 05-10-2010 01:23 AM
LXer: Avant Window Navigator is Back, Quick Review and Installation in Ubuntu LXer Syndicated Linux News 0 12-16-2009 11:31 AM
ktorrent - part of window missing ungua Linux - Software 2 11-30-2006 06:56 AM
Missing window controls w/ Gnome JMCraig Fedora 8 03-28-2005 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

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

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