disk changed from sda to hda on kernel upgrade

Bug #97274 reported by John M
10
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

After the upgrade and restart, my wallpaper was not loaded (my wallpaper is in a vfat partition, so I can easily know when something goes wrong); fdisk -l showed that the hard disk was not sda anymore. The system was pretty slow as well. I changed the fstab options from sda to hda and everything went fine again.

I guess the problem is in the Ubuntu 7.04 install, since all the previous versions of Ubuntu (i.e., 5.10, 6.06 and 6.10) have taken my hard disk as hda from the start.

ProblemType: Bug
Architecture: i386
Date: Tue Mar 27 23:17:36 2007
DistroRelease: Ubuntu 7.04
Uname: Linux walrus 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

I have the exact opposite problem after DistUpgrade to Feisty.

All my hard drives /dev/hd* is now named /dev/sd* .

DistroRelease: Kubuntu 7.04
Uname: Linux andreas-laptop 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux

Revision history for this message
Gijs Peek (gijs-peek) wrote :

I also have this problem. My (ide) hd was /dev/hda, is now /dev/sda. My cdrom is also not listed as /dev/hdc anymore (/dev/cdrom and some other device names still work though)

Linux laptopgijs 2.6.20-13-386 #2 Sun Mar 25 00:18:53 UTC 2007 i686 GNU/Linux

relevant sections from output of lshw command:
        *-ide
             description: IDE interface
             product: 82801DB (ICH4) IDE Controller
             vendor: Intel Corporation
             physical id: 1f.1
             bus info: pci@00:1f.1
             logical name: scsi0
             logical name: scsi1
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: ide bus_master emulated scsi-host
             configuration: driver=ata_piix latency=0
             resources: ioport:1f0-1f7 ioport:3f4-3f3 ioport:170-177 ioport:374-373 ioport:ffa0-ffaf iomemory:36000000-360003ff irq:19
           *-disk
                description: SCSI Disk
                product: TOSHIBA MK6021GA
                vendor: ATA
                physical id: 0
                bus info: scsi@0:0.0.0
                logical name: /dev/sda
                version: GA02
                serial: 24654063S
                size: 55GB
                capabilities: partitioned partitioned:dos
                configuration: ansiversion=5
              *-volume:0
                   description: Linux swap / Solaris partition
                   physical id: 1
                   bus info: scsi@0:0.0.0,1
                   logical name: /dev/sda1
                   capacity: 1027MB
                   capabilities: primary nofs
              *-volume:1
                   description: Linux filesystem partition
                   physical id: 2
                   bus info: scsi@0:0.0.0,2
                   logical name: /dev/sda2
                   capacity: 54GB
                   capabilities: primary bootable
           *-cdrom
                description: DVD reader
                product: CDRW/DVD SBW242U
                vendor: QSI
                physical id: 1
                bus info: scsi@1:0.0.0
                logical name: /dev/cdrom
                logical name: /dev/dvd
                logical name: /dev/scd0
                logical name: /dev/sr0
                version: UU30
                capabilities: removable audio cd-r cd-rw dvd
                configuration: ansiversion=5
              *-disc
                   physical id: 0
                   logical name: /dev/cdrom

Revision history for this message
Gijs Peek (gijs-peek) wrote :

I see now that changes from hda to sda is intended for kernels >=2.6.19
http://kernelnewbies.org/Linux_2_6_19#head-cdcbaa9c1b476decdc064e0a75d23d1328b1ddce
Don't know about sda -> hda though...

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Maybe it would be an idea to check the fstab (maybe others too) and change hd* to sd* for relevant mounts during the upgrade procedure.

Revision history for this message
True_Friend (muhammadshakir2002) wrote :

Same thing happened here. I then changed hdx to sdx in /etc/fstab and now able to interact with all partitions but they are not auto. I cannot show them automatically on desktop(Kubuntu) so i made links to partitions manually.
Regards
True_Friend

Revision history for this message
r.stiltskin (r.stiltskin) wrote :

A few days ago I did a version upgrade (with the kubuntu upgrade wizard) on my laptop, which has just a single ide hard drive, from kubuntu edgy to feisty. The upgrade installed kernel 2.6.20-16-generic. and changed the hard disk from hda to sda.

Yesterday I did a fresh install of feisty (after an attempted upgrade from dapper to edgy to feisty went badly) on another machine which also has only a single ide hard drive. It installed kernel 2.6.20-15-generic and the hard disk shows up as hda.

So does this mean that 2.6.20-15-generic reverted back to the old ide drivers and 2.6.20-16-generic is using the new drivers again?

Is this a bug or a feature?

Revision history for this message
tomás zerolo (tomas-tuxteam) wrote :

Happened to me as well. I have two PATA drives attached to a PCI controller:

  Mass storage controller: Promise Technology, Inc. PDC20268 (Ultra100 TX2) (rev 01)

according to lspci. That means that /dev/hde and /dev/hdg now appeared as /dev/sda and /dev/sdc. Ouch. On the upgrade to edgy, the upgrade script (mis-) fixed my fstab, trying to move things to UUID. Besides of missing the last linefeed, which gave rise to lots of funny warnings, it managed just to mount one drive (the one mounted on a directory of the root partition). The other, which went on a subdirectory of the first one, was completely missed.

Well, the edgy upgrade should have taken care of that, with all this UUID stuff, you say?

(Attached a somewhat censored copy of my fstab, which might make things clearer. Especially, the $$$$$'s there are censored expletives. After-the-fact comments writen for here are prefixed with #>>)

No. Apart from something which broke back then (the swap partition wasn't found by UUID, -- eh, whatever), somehow sdb was missed (I did install the latter after edgy upgrade).

Now I don't expect a script to cope with strange, hand-tailored fstabs. But I have two concrete rants:

  * folks. This libata stuff is really, really new. I'd expect at least a warning before you throw it on us.

  * don't touch fstab when it has *obviously* been hand-edited that heavily. Tell the user what is (what are) the issues.

Ah, btw: i *hate* web sites forcing me to enable cookies (or javascript) in my browser. I think I would write more bug reports otherwise.

Regards
-- tomas

Revision history for this message
Andres Mujica (andres.mujica) wrote :

This was an upstream change featured on Feisty. The fstab was automatically changed to UUID usage, is possible to some of you had manually edited this file so you had problems with the migration.

Please accept our apologies if this was the case.

At this point you shouldn't have this problem at all. If you're system is suffering please try with latest Ubuntu release.

Also i would mark this as invalid as it's not really a bug but a misconfiguration problem.

Thanks for your help, support and understanding.

Revision history for this message
r.stiltskin (r.stiltskin) wrote :

As I described above, my disk changed from hda to sda when I upgraded to Feisty. Can you tell me how to change it back to hda? Will this happen automatically if I upgrade to Gutsy (*upgrade*, not new install) or do I have to edit something manually before (or after) upgrading?

Thanks.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@r.stiltskin
You should edit /etc/fstab and change every occurrence of hd?? to sd??. Alternatively you should change your fstab to use UUID's (the best solution). The command "ls -l /dev/disk/by-uuid/" will list the UUID's and what partitions they represent. For further help you could ask in #ubuntu at irc.freenode.net .

Revision history for this message
r.stiltskin (r.stiltskin) wrote :

There are NO occurrences of hd?? or sd?? in my fstab (except in #comments, all of which are /dev/hd??). My fstab was automatically written when I installed Dapper, and automatically modified when I upgraded to Edgy. All of the partitions are identified by uuid. The output of ls -l /dev/disk/by-uuid looks like:
lrwxrwxrwx 1 root root 10 2008-2-25 08: 49 ??????-????-????-????-???????????? -> ../../sda8
and so on...

So I am wondering why this bug is being closed as a "misconfiguration problem", and I ask again what, if anything, I can do to identify my partitions as hd??, as they used to be before the upgrade.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@r.stiltskin
If all partitions is identified by UUID's in your fstab, all your partitions should be mounted correctly. If not, it is a completely different problem than this. All partitions should be identified by UUID's. This bug was opened because the fstab wasn't automatically rewritten to UUID's.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.