LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing Debian on external (connected through USB) hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/installing-debian-on-external-connected-through-usb-hard-drive-876687/)

dannte 04-23-2011 12:40 PM

Installing Debian on external (connected through USB) hard drive
 
Hello all, that's my first post here:)

I've got Vista installed on my notebook and I've bought an external drive (1,5 TB, but its size shouldn't matter in this case) and after formatting it I left 10 gigs for future purpose. Now, I decided to install 64bit debian on the unallocated 10 gigs. And so I did.

To be precise: I have SATA drive inside my lap and hard drive (it's also SATA inside the cover) connected to my lap through USB. Boot sequence was 1)CD/DVD 2)hard drive 3)removable drive. During the installation the installer detected my internal drive as /dev/sda and my external drive as /dev/sdb. I decided to install grub on /dev/sdb (it was logical to me, since I didn't want to mess up my regular drive's MBR). Installer created 5 partitions on my USB drive.

After booting from my external drive (look below*) I've got a message saying
Code:

error: no such partition
Entering rescue mode...

and after that I was in grub rescue console. When I typed ls I've got an output
Code:

(hd0) (hd0,msdos1) (hd1) (hd1,msdos5) (hd1,msdos2) (hd1,msdos1)
When I tried to type
Code:

ls (hd0)/
I only got a message
Code:

error: unknown filesystem
This occured for all the listed devices...

On my internal drive there were (during the installation and running the live cd) 3 partitions detected (vista os, data, rescue disk) so I don't understand the output that ls in rescue console gave me. What I did wrong?

* about booting from external drive: I did that after pressing ESC - I've got a prompt to choose which device I want to boot from - this wasn't working properly; after changing the boot sequence the grub started but with the abovementioned error message...

If there's any info about exact names/types/devices of my installed partitions needed I will run live CD and check it. If any other info is required I will provide it (I tried to describe the problem in the most precise way :) )

What I was thinking about: maybe there is a problem with ordering of the devices - when I boot from DVD my removable disk is treated as the "second one" and after booting from the removable disk it becames the "first one" or something like that? If any of you have any good info on how mapping of the device names works it would be appreciated, since I couldn't find anything useful or I just don't know what to ask google about.

To sum up:
1) How to install Debian on a removable disk (I had no problems with installing Linux on pendrive but I did that from VirtualBox and it was some time ago) OR how to install GRUB on a removable disk? (unfortunately, I cannot install 64bit system through VirtualBox)
2) What's the logic behind naming devices under /dev? How come the devices in grub have their names mapped as hdx etc and I've read that hdx are the names for IDE/ATA drives and sdx is the proper name for a SATA or USB device

Many things here are not well understood by me, so I could write something stupid or inconsistent, but I hope you will understand me.

Thanks in advance and regards!

dannte 04-24-2011 03:58 AM

Hi again,

What I have investigated so far is:
1) after typing 'ls' in grub rescue I get (hd1,msdos5) on the list of possible boot devices;
2) in the /boot/grub/grub.cfg file I have (hd1,msdos5) used and also (hd1,msdos6), (hd0,msdos1), (hd0,msdos2)
3) after typing 'set' in the grub rescue I get:
Code:

prefix=(hd0,msdos5)/boot/grub
root=(hd0,msdos5)

and I'm wondering why there is something like "(hd0,msdos5)"?

In grub.cfg I also noticed a line that says (for Vista booting option) something like "drivemap -s (hd0) ${root}". If a complete grub.cfg file is needed then I can post it here.

I was also wondering - should I remove my internal drive for the time of installation? I mean the whole installation, since I am not able to install only the grub itself (or I don't know how - grub-mkconfig worked but grub-install threw an error).

I have no ideas left, I tried so many things and rebooted my lap so many times and I still cannot determine what causes the problem.

EDDY1 04-24-2011 04:14 AM

You're trying to install debian on the remaining 10Gig space of 1.5 TB drive?
Read this
http://ircanswers.com/ubuntu1/359285...xplained-about

dannte 04-24-2011 07:40 AM

Ok, I get it now, my /boot has to be "closer" to MBR than 128 gigs. Is it possible to reallocate the remaining 10 gigs, so that they will be placed on the beginning of the drive instead of being placed after my 1,4TB? Or nevermind, I will just leave it like that, I don't want to risk losing my data.

So, for the future: when formatting, it's better to allocate empty space on the beginning of the drive instead of leaving it unallocated for a future purpose :) - I just thought it's safer to leave it unallocated...

Thanks anyway.


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