Jump to content

fstab and changing device name [solved]


aerogate
 Share

Recommended Posts

Hi there,

 

Strange problem with device name of SATA drive.

 

Each time I boot Mandriva 2008, my SATA drive (single large partition) that`s used as extra storage get`s assigned a different device name, it`s either /dev/sdb1 or /dev/sda1

 

Which means I cant set it to auto-mount in fstab.

Problem appeared since 2008 mdv

 

Anyone help me with this?

Mike

 

 

[moved from Installing Mandriva by spinynorman]

Link to comment
Share on other sites

What other devices (hard drives, cdroms, external drives, etc.) do you have in your setup?

 

IDE Primary Master has a 60 Gig hard drive split into 3 partitions root, home and swap for Mandriva 2008.

IDE Secondary Master has a DVD Rewriter

Sata 1 has a 400 Gig Hard Disk single partition ext3

 

I have thought of a workaround by having 2 entries in fstab, one for if the sata drive is detected as sdb and another if it`s detected as sda.

One entry will always fail of course, but it should then at least be mounted on bootup.

 

Like this :-

 

/dev/hda1 / ext3 relatime 1 1

/dev/hda5 /home ext3 relatime 1 2

/dev/cdrom /media/cdrom auto umask=0022,users,iocharset=utf8,noauto,ro,exec 0 0

none /proc proc defaults 0 0

none /tmp tmpfs defaults 0 0

/dev/hda6 swap swap defaults 0 0

/dev/sda1 /mnt/bulkstorage ext3 defaults 0 0

/dev/sdb1 /mnt/bulkstorage ext3 defaults 0 0

Link to comment
Share on other sites

The workaround you are thinking of will probably cause your system to halt during bootup and ask you to run fsck to check your disks since it can't find the partition it's trying to mount. Alternatively, change defaults to default,noauto and then that will stop it trying to mount automatically, and you can then just get to it after your system has started and the first access to this area will mount the disk.

 

However, if it's changing all the time, then it must be detecting some other storage device connected that gets a /dev/sdx denomination, maybe a usb stick is left attached, or something else, or there is a problem with the connection of the drive to the motherboard.

 

I have a usb hard disk that sometimes has problems with the cable, and it disconnects, but reconnects quickly and becomes /dev/sdb. I'm betting that it is this, or you have some other storage device like a usb disk attached too.

Link to comment
Share on other sites

Ian's answer makes a lot of sense.

If you are in the habit of rebooting with USB removable drives this could make for trouble especially if you are not consistent about this. Remember you do not have any bios restrictions on your SATAs at the moment so the system will change as it sees fit if other drives are connected or not connected.

I don't have this problem because I have no IDE HDDs and therefore my bios is set to boot from the SATAs so they always remain sda and sdb.

 

Cheers. John.

Link to comment
Share on other sites

Thank you, your suggestions made sense, so I looked at what could be attached as a USB storage device, was puzzling because I don't have one! or so I thought. Here was the culprit!

 

Identification

Vendor: ?HP

Description: ?Photosmart 7400 (HP

Disk identifier: ?CN47R2V265UJ

Media class: ?hd (Printer|Printer|Bidirectional)

Bus identification

Vendor ID: ?0x03f0

Device ID: ?0xb802

Sub vendor ID: ?0x0000

Sub device ID: ?0x0000

Connection

Bus: ?SCSI (USB) (1)

Channel: ?0

Logical unit number: ?0

Device

Old device file: ?/dev/sda

Misc

Device USB ID: ?11

Geometry: ?// (CHS)

Disk controller: ?0

Module: ?usb-storage (usblp)

 

Yes! my printers smart media socket! still a little puzzled, I never have a memory card inserted in it, but still get the random assignments of sda and sdb, but the printer is defiantly the cause, maybe the newer kernel in 2008 has brought this problem to light.

Link to comment
Share on other sites

There should be some modules loaded, something like mmc_block and others for the SD/smart-media sockets. If you don't use them, blacklist the modules to stop them from loading. Then it will save you all the problems you're experiencing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...