LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-20-2012, 02:22 PM   #1
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Rep: Reputation: Disabled
Missed hard drive after installing Debian


Hi,

I've just installed Debian and missed one internal hard drive.

I used to have two of them, one (volume C: to Windows) running Windows XP and another one (E: ), ready for Debian install. The idea was to have OSs separated so to eliminate Windows by just formatting C:.

In partitions table settings I kept C: as NTSF (default), and E: divided into primary and swap parts. Does this give any clue?

By the end of the process I had a dialog going like: "Debian recognized MS Windows already installed. Do you want grub installed too so you can choose OS at start up?" Said ok, rebooted and I just found Debian and Debian recovery mode options. No Windows, and then volume C: didn't show up in file manager nor in media folder.

It appears in BIOS, but giving it booting priority just leave me with a blank screen and an underscore on top, blinking forever. Is there a way to look for the drive before attempting to repair the installation (hope not needed)?

Thanks in advance.

Last edited by LaCaradeculito; 06-21-2012 at 12:50 AM.
 
Old 06-20-2012, 04:20 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
If you are just trying to find the drive, then you can:

Code:
fdisk -l
or
Code:
dmesg | grep Attached
 
Old 06-20-2012, 09:46 PM   #3
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi, thanks very much for the tip. Currently, this is what I have. I'm just trying to decifer it. Hopefully the red highlighted part is not an empty drive that could be my lost (accidentaly erased) 150Gb one.

Any clue on this, kindly welcome and appreciated.
Best.


Code:
root@marcelosantorelli:/home/marcelo# fdisk -l

Disk /dev/sda: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 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: 0xac9c0cf0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       20023   160834716    7  HPFS/NTFS
/dev/sda2   *       20024       20024        1724+  17  Hidden HPFS/NTFS

Disk /dev/sdb: 61.5 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 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: 0x000746a1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        7352    59045888   83  Linux
/dev/sdb2            7352        7477     1003521    5  Extended
/dev/sdb5            7352        7477     1003520   82  Linux swap / Solaris
root@marcelosantorelli:/home/marcelo# dmesg | grep Attached
[    1.543979] sr 1:0:1:0: Attached scsi CD-ROM sr0
[    1.593705] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.636990] sd 0:0:1:0: [sdb] Attached SCSI disk
[    1.667292] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.669061] sd 0:0:1:0: Attached scsi generic sg1 type 0
[    1.670627] sr 1:0:1:0: Attached scsi generic sg2 type 5
 
Old 06-20-2012, 09:57 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
That sda1 looks like an NTFS parition. It probably isn't mounted.

Um,.. youll have to install 'ntfs-3g' to be able to mount it. Which is an NTFS userspace driver.
 
Old 06-20-2012, 11:43 PM   #5
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
I would not dare try to give advice on repairing, but sda is your Windows system, with sda1 and sda2 being partitions. sdb is your Linux system. sda2 being hidden appears to be the problem. I do not want to give you bad advice about getting grub to recognise it.
 
Old 06-21-2012, 05:40 AM   #6
abi0909
Member
 
Registered: Jul 2009
Distribution: Ubuntu, RedHat, VMWare, CentOS, Windows, Android, Mac
Posts: 55

Rep: Reputation: 18
So here is what has happened - when you install Debian (or any unix flavour), the grub boot loader will replace your Windows Boot loader whixh is needed for Windows to boot directly. Hence, when you choose the Windows drive to be your primary boot device in the BIOS, it will not boot into Windows because there is no boot loader in windows and hence you see the blinking cursor. This does not mean that your Windows is corrupted - the only way to boot from your windows is by booting into the debian disk and then choosing Windows from there. You can also set it up to boot directly from Windows instead of booting into Debian (change the default flag in grub.conf - google for more info).

Now - Grub is smart and if it sees a Windows disk in your machine, it will automatically add it to your Grub menu and will display "Windows" in the Grub splash screen. If you do not see it, then you can "edit" the grub.conf and "add" windows partition into it, so that it will display it the next time. But be extra careful when you edit this file - any one mistake or typo, your Ubuntu will not boot either and you will need to boot into recovery mode to fix this file again.

In order to add Windows partition into the your grub - look at this page ---> http://wiki.debian.org/GrubConfiguration .. This explains how to edit your grub and so on and so forth !!

All the best ..
 
Old 06-21-2012, 06:58 AM   #7
VDP76
Member
 
Registered: Apr 2010
Location: Bayreuth, Germany
Distribution: CrunchBang Linux (#!)
Posts: 111

Rep: Reputation: 19
hi LaCaradeculito,
I think, as abi0909 already said, that your WinXp partition (sda1) is just fine, it looks to me that sda2 is a hidden recovery partition.
The first simple thing I would try to do is
Code:
sudo update-grub
I won't edit grub.conf directly, if you want to make some changes you have to edit /etc/default/grub instead and then run sudo update-grub.

Hope this would help.

Last edited by VDP76; 06-21-2012 at 07:05 AM. Reason: formatting and typos
 
Old 06-21-2012, 11:32 AM   #8
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks so much!!!

I made a huge step forward with your explanation, even though I still couldn't look into links extensively. Just with update-grub Windows showed up, and it runs!. That was 90% of my concern since I achieved access to 150Gb I was afraid to have lost. My 10% left is all that data does not appear anywhere in Debian file system yet.

Meanwhile, I got an extra issue. When I chose Windows a next dialog gave two options:
- run Windows (ok, works)
- continue installation (hey, wasn't it finished!), on which I'm again stuck with cd-rom drivers issues, but working. So...

Maybe I still have chances to see that volume after the whole process, if the rest has something to do with the subject. I'll let you know.
Again thank you so much for your advices.

Last edited by LaCaradeculito; 06-21-2012 at 11:56 AM.
 
Old 06-21-2012, 07:30 PM   #9
VDP76
Member
 
Registered: Apr 2010
Location: Bayreuth, Germany
Distribution: CrunchBang Linux (#!)
Posts: 111

Rep: Reputation: 19
I am glad I have been of help!

Now, for you first concern have a look here, particularly at the section about /etc/fstab (also see this).

About the "continue installation problem", is it about installing Win or Debian?? Anyway, can you finally get to the desktops of both OSs and use them?
 
Old 08-27-2012, 09:51 PM   #10
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi guys:

new problems. I made the same mess, but inverted.

As I said before, I have two HD in on computer. One is running Debian, the other was working with a corrupted Windows xp that I intended to reinstall (first time I manage MS installation cds). I finally got Windows working fine, but:
1. don't have chance to choose OS at starting: Windows initiates directly
2. don't see the other volume
3. don't seems to exist any grub to update this time

Any clue? I'm freaking out. Thanks very much.
M.

Last edited by LaCaradeculito; 08-27-2012 at 10:01 PM.
 
Old 08-27-2012, 10:21 PM   #11
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
VDP76,

sorry for ignoring your kind message. I did't see it until I came back with more problems

Yes, during all this time I achieved to see both OSs desktops and work quite fine with the two. However, I never got Windows to see other volumes than the one it is installed in. On the other hand, Debian didn't give much trouble to do it after I got helped.

Thanks so much for the suggestions.

Best.
 
Old 08-27-2012, 10:43 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Re-installing xp overwrote the Grub code in the master boot record. Windows bootloaders won't detect a Linux install so you will either have to manually configure the windows bootloader to boot Debian or reinstall the Debian Grub. You should be able to do that with the Debian installation CD.

You can install Debian Grub to the mbr of sdb (assuming your Debian install is still on sdb?) or to sda. If the former, you can select in the BIOS to boot the Debian drive or the windows drive. If you install Debian Grub to sda, it will of course overwrite the windows boot code in the mbr there but it should create an entry for windows. Post back on which method you would prefer and someone will explain the steps.
 
Old 08-28-2012, 03:21 AM   #13
VDP76
Member
 
Registered: Apr 2010
Location: Bayreuth, Germany
Distribution: CrunchBang Linux (#!)
Posts: 111

Rep: Reputation: 19
LaCaradeculito,
as mentioned by yancek your MBR has been overwritten by windows install, so now you have to restore GRUB. If you want to do it "manually", see this how-to on chrooting, for that you'll need a live cd (Debian-live or Crunchbang would be ok).
Otherwise a "automatic-GUI" way is using Rescatux (which is also a well documented project).

Finally, you want to see Debian's partitions from windows..well that doesn't come out of the box (M$ doesn't like to play with Tux.. ). If you're fine with read-only try Linux Reader (tested myself, works fine); if you really want read/write support (note: I won't let windows potentially mess up my Debian partitions!) there are project like ext2fsd (untested for me).

Have fun!
 
Old 08-28-2012, 09:42 PM   #14
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,358
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Back to the original issue, Debian does not include NTFS drivers by default. As szboardstretcher said, you will have to install them in Debian.

http://wiki.debian.org/NTFS
 
Old 09-03-2012, 03:54 AM   #15
LaCaradeculito
LQ Newbie
 
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
With your help I first thought the solution was near, but I started "failing in circles" =D

My partitions are as follow...
Code:
Disk /dev/sda: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders, total 321672960 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: 0xac9c0cf0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    30716279    15358108+   7  HPFS/NTFS/exFAT
/dev/sda2        30716280   321653429   145468575    f  W95 Ext'd (LBA)
/dev/sda5        30716343    71682029    20482843+   7  HPFS/NTFS/exFAT
/dev/sda6        71682093   321653429   124985668+   7  HPFS/NTFS/exFAT

Disk /dev/sdb: 61.5 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders, total 120103200 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: 0x000a574d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758   120102911    59800577    5  Extended
/dev/sdb5          501760   120102911    59800576   8e  Linux LVM
What I tried was to rescue the system from Debian netinst liveCD, with which I come to a shell and type...

Code:
$ sudo mkdir /mnt/sdb1
$ sudo mount /dev/sdb1 /mnt/sdb1
(this below doesn-t work) 
$ sudo chroot /mnt/sdb1 /usr/sbin/grub-install --recheck /dev/sda
(so...) 
$ sudo /usr/sbin/grub-install --recheck  --root-directory /mnt/sdb1 /dev/sda
or simply
Code:
$ sudo update-grub
Then I exit the shell and find a new option "reinstall grub" which was not there before. Looks like the solution but after rebooting I find grub giving no options but to write code. I also tried the same from Knoppix liveCD, but something about the "--root-directory" argument is objected.

VDP76, the linked page you suggested (how to chrooting), resulted in errors such as folders not previously created (should be no problem to mk them then), but finally even chroot command did not work to me either. So I sticked to this guide.

I am confused because I once got my old linux installation... and messed it up again in trying to get Windows option at grub. I do not know what different thing I did that time.

Thank you all so much... and sorry for delaying my answer. I just gave myself the time to try all possibilities suggested here. Hope not to have missed details in my explanation.

M.

Last edited by LaCaradeculito; 09-03-2012 at 04:02 AM.
 
  


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
problem installing Debian on a different hard drive mhg Linux - Newbie 14 11-13-2008 11:49 AM
installing a 200 GB hard drive with Debian 3.1 kenramsey Linux - Hardware 2 08-23-2006 05:06 PM
Installing Debian on a (fat32) USB hard drive nagromo Debian 7 01-05-2005 12:33 AM
Installing Debian 3.0 from a hard drive copy? everest Debian 2 07-01-2004 06:55 PM
Installing Debian From Hard Drive MrSmee Debian 3 10-21-2003 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 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