LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-15-2008, 03:57 AM   #1
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Rep: Reputation: 34
Smile device mapping switch


I had 3 Linux installed and booting on my internal IDE drive with windows XP, all on separate partitions, (PCLinuxOS, Ubuntu, and Mepis) and the grub last installed with Mepis on the MBR. I also have a external eSATA/USB drive now with Fedora 9 installed just fine. I had to do a repair of the MBR just before I installed Fedora, so now I can only boot into XP and the new Fedora 9, and want to add the other Linux's but I have both a changed swap file, (due to some partitioning changes with GParted), and issues with the internal and external drive device order, or mapping. Mepis had the device map file as ; (hdo) /dev/hda , and (hd1) /dev/sda , which are the internal IDE and external hard drives, which seems correct. Now Fedora has this device map file; (hd1) /dev/sda, and (hd0)/dev/sdb, and in the grub it lists Fedora root as (hd0,0), so will a drive map switch fix this issue?
Here is my drives fdisk -ls;

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x826d56f6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 208813+ 83 Linux
/dev/sda2 1959 3916 15727635 83 Linux
/dev/sda3 6201 16970 86510025 f W95 Ext'd (LBA)
/dev/sda4 27 1958 15518790 83 Linux
/dev/sda5 14164 16970 22547227+ 7 HPFS/NTFS
/dev/sda6 6201 6722 4192902 82 Linux swap / Solaris
/dev/sda7 6723 8680 15727603+ 83 Linux
/dev/sda8 8681 10638 15727603+ 83 Linux
/dev/sda9 10639 12596 15727603+ 83 Linux
/dev/sda10 12597 14163 12586896 b W95 FAT32

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x89518951

Device Boot Start End Blocks Id System
/dev/sdb1 * 534 10976 83883397+ 7 HPFS/NTFS
/dev/sdb2 10977 13587 20972857+ 83 Linux
/dev/sdb3 13588 24321 86220855 f W95 Ext'd (LBA)
/dev/sdb5 13588 15545 15727603+ 83 Linux
/dev/sdb6 15546 17503 15727603+ 83 Linux
/dev/sdb7 17504 18064 4506201 82 Linux swap / Solaris
[root@localhost ~]#
 
Old 06-15-2008, 10:13 PM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Can you please describe what is not working properly?

The device map is (I think, correct me if I'm wrong) more or less a convenience feature to allow you (for example) to use 'grub-install /dev/sda'. It should not change the behaviour of grub.

Please also identify (in Fedora) which of sda or sdb is your internal drive. With libata, both ide and sata disks now share the /dev/sdX namespace. Also, different distributions may load kernel modules in a different order, thus changing the name-device mapping.
 
Old 06-16-2008, 12:17 AM   #3
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Original Poster
Rep: Reputation: 34
Post

The internal IDE hard drive is, Disk /dev/sdb: 200.0 GB, and I can boot the windows XP fine since no grub in on that drive. And then to boot the external USB/SATA drive by the grub for Fedora, I just hit the F10 key early in the POST to select the boot first device as the external drive, which is; Disk /dev/sda: 250.0 GB.The 3 Linux's installed on the internal drive are not yet booting, but were booting with grub from Mepis on the MBR of that internal drive. But since some major repair of the mbr and the partition table, and some partition changes using the GParted tool, such as; (delete, re-size, etc),the swap file has changed partition number for the internal drive, and first hard drive has switched too.
 
Old 06-16-2008, 07:46 PM   #4
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Original Poster
Rep: Reputation: 34
Question

I found where to change the swap file, (etc/fstab file), and now need to know for device map change. Do I change both the device.map file, and the grub boot menu.lst file too, (since the internal and external hard drives are switched in Fedora 9 device map file, as compared to how it was when I had all the Linux distro's booting originally). The newer Linux versions will see both IDE and a SATA drive as sda, and sdb, where-as some older versions see the internal IDE as hda, and the external USB/SATA as sda.
 
Old 06-17-2008, 07:07 PM   #5
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
If what you are trying to do is to add Windows to the grub menu, there is no need to edit device.map . If the system boots from the external disk, that one should be hd0. Just edit menu.lst :
Code:
title Windows XP
root (hd1,0)
makeactive
chainloader +1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mapping usb device to device file scerenon Linux - Hardware 12 07-20-2006 05:13 PM
Linux device mapping npuetz Linux - General 1 05-26-2005 06:55 AM
LUN device mapping jdepaul Linux - Hardware 0 08-02-2004 03:42 PM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 12:50 PM
Memory mapping a device PLEASE HELP!!!! mpalmer Linux - Newbie 1 08-16-2001 04:09 PM


All times are GMT -5. The time now is 10:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration