LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-24-2010, 08:17 PM   #1
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Rep: Reputation: 0
Wink Dynamic /etc/fstab?


Hi

Everytime I boot my /etc/fstab changes. This creates hell whenn I try to figure another problem I have with some raid disks. They change as well. So nothing is for instance "steady" /dev/sda and /dev/sdd, they change all the time. What can I do about this?

Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=6e7a172a-efa1-41a5-a629-1208e12672ef /               ext3    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=5d760c04-571e-431e-bec9-0f0e9110dcdc none            swap    sw              0       0
#/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
#/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
This is on a semi-production server as well, and I dont want any more downtime this week.
 
Old 02-24-2010, 08:40 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Create some udev rules. I'm sure you'd be able to take it from there
 
Old 02-24-2010, 08:51 PM   #3
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Walk in the park..
 
Old 02-25-2010, 11:21 AM   #4
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Okay, irony on the internet doesnt work.
I dont know how to write my own udev rules. I looked it up via google and found some tools name udevinfo that cannot be installed on Debian.
Debian has something called udevadm which is something else I belive.

So, basicly I need some help on this.
 
Old 02-25-2010, 02:19 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
I think the command you are looking for is:
Code:
udevadm info -a -p  $(udevadm info -q path -n /dev/sdb)
Where /dev/sdb is whatever your device is at the time. The above should provide output equivalent to udevinfo

Evo2.
 
Old 02-25-2010, 04:03 PM   #6
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
thanks alot!
This will be quite scary process to do on a production server!
 
Old 02-25-2010, 04:37 PM   #7
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
There has to be a easier way to fix this little fstab "problem" without using some complicated udev rules.

As one can see in the grub entry, something is wrong

Code:
menuentry "Debian GNU/Linux, with Linux 2.6.32-trunk-686" {
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 6e7a172a-efa1-41a5-a629-1208e12672ef
        echo    Loading Linux 2.6.32-trunk-686 ...
        linux   /boot/vmlinuz-2.6.32-trunk-686 root=UUID=6e7a172a-efa1-41a5-a629-1208e12672ef ro  quiet
        echo    Loading initial ramdisk ...
        initrd  /boot/initrd.img-2.6.32-trunk-686
insmod ext2? The partition is ext3.
search floppy? Why? No floppy on disk computer.
Load ramdisk? What?
 
Old 02-25-2010, 04:57 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Have you considered not using uuid and going back to /dev/sdx type of fstab entries?
 
Old 02-25-2010, 05:00 PM   #9
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Uhm, I really dont know much about this. This is came very surprisingly on me. Never seen this mess before. So I haven't considered much. Care to explain?
All I really want is a standard /dev/sda1 every time I boot. Not this random crap. (pardon).
 
Old 02-25-2010, 05:28 PM   #10
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
OK, you're running Lenny with Grub2 installed... Grub2 is a PITA [rant-mode] and frankly I couldn't begin to think why the Debian dev's allowed this crap into the main tree in the first place [rant-off]... :-\

Fortunately, there's still the 'real' Grub in Lenny. As root, start aptitide, search for the grub-legacy package and install that. It probably conflicts with any Grub2 package, allow aptitude to purge these. Hunt around for stale Grub2 packages and if found, mark for purging. Hopefully you'll have a decent fstab file afterwards. At least it's easier to troubleshoot
 
1 members found this post helpful.
Old 02-25-2010, 05:33 PM   #11
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Should I halt and remove the other drives first? I case grub1 thinks the other drives are /dev/sda1 and so on?
 
Old 02-25-2010, 05:40 PM   #12
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Dutch Master probably has it nailed. Sure, grub1 is confusing, but I haven't heard anything good about grub2 yet. So, just in case, download Super Grub Disk and put it on a CD. Better safe than sorry if the conversion to the good grub flops, somehow.
 
Old 02-25-2010, 05:47 PM   #13
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I don't think that's a good idea, because grub-legacy will detect them during installation and will (hopefully) understand that the drive with the /boot partition has to be the first (i.e. sda).

But I'm still puzzled how you got a production server in this situation.... My advise is to have a proper review and rethink on your IT infrastructure and how to perform admin-tasks to it... And I'm still wondering why you'd need to reboot said production server so often in the first place... :-\

[edit] I missed Quakeboy2's reply. My reply was aimed at the removal of the other disks. I concur with his suggestion to get a SDG disk. [/edit]

Last edited by Dutch Master; 02-25-2010 at 05:51 PM.
 
Old 02-25-2010, 05:51 PM   #14
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Long story short.
My burner is staying in my windows machine. My linux machine now uses the graphics card that stays in the windows machine. My mac has the burner shut on the slot-in burner. IE, I dont have any burner to use at the moment.
I have a kingston 16 gb memory stick of some sorts
 
Old 02-25-2010, 05:53 PM   #15
mrf00rk
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Dutch master, this has been a hell of a week. You dont want to know. But anyways, This is the situation Im in. Gotta make the best of it.
 
  


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
Restricting Dynamic Ipaddress by based on Dynamic DNS host names karthik9110 Linux - Newbie 5 12-13-2009 11:46 PM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
Dynamic Entries in fstab? bigoli MEPIS 1 06-02-2005 02:18 PM
dynamic fstab and /mnt sleepylight Linux - Software 1 08-09-2004 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:11 PM.

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