FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-27-2010, 10:06 AM
Alex Schuster
 
Default Old IDE drives and the "newer" PATA kernel drivers

Dale writes:

> Hmmm, I use resierfs for my file systems, most of them anyway. I still
> use e2fsprogs to change those?

No, but you can use reiserfstune -l.

> Is there a way to boot a Gentoo/Knoppix CD and make it use the PATA
> drivers? That way I can boot it and see exactly how it will name them
> and what drive is what without actually changing anything at all. Is
> there a boot option "noide" or some other switch I can use?

Don't know. But even if so the result is not cecessarily accurate.

My two SATA drives were sd[ab], but when I added two PATA drives those got
these names, and the SATA ones became sa[cd]. But even this changes, with
a kernel derived from GRML, the PATA ones were sd[bc], and the SATA ones
sd[ad]. Weird, huh? And things become even mor eunpredictable when I have
USB drives plugged in during boot. So I also suggest using labels or
UUIDs.

My own method is yet another one. As I have everything on LVM (except for
the /boot partitino, which is on an USB stick), my drives are identified
by their volume group. /dev/weird is the system drive, /dev/weird2 is the
identical backup drive. This way I do not have any /dev/sdX in either
fstab or grub.conf. And when the system drive fails, I vgrename wird2 to
weird, and then the backup drive will become the system drive.

Wonko
 
Old 08-27-2010, 10:10 AM
Nikos Chantziaras
 
Default Old IDE drives and the "newer" PATA kernel drivers

On 08/27/2010 12:49 PM, Dale wrote:

Is there a way to boot a Gentoo/Knoppix CD and make it use the PATA
drivers? That way I can boot it and see exactly how it will name them
and what drive is what without actually changing anything at all. Is
there a boot option "noide" or some other switch I can use?


You do the labeling *before* you switch to the new kernel. Once you get
it working correctly with your current kernel, then you can upgrade to
the new ATA drivers and it will just work (which is the whole point of
this exercise.)
 
Old 08-27-2010, 10:15 AM
"Stefan G. Weichinger"
 
Default Old IDE drives and the "newer" PATA kernel drivers

Am 27.08.2010 10:50, schrieb Nikos Chantziaras:

> Applying labels to your filesystems is trivial. Simply use the e2label
> utility (it's in the sys-fs/e2fsprogs package and installed by default,
> so there's nothing new to emerge). For example, if your hda1 is your
> root partition and your hda2 your swap, you can label them like this:
>
> e2label /dev/hda1 GentooRoot
> e2label /dev/hda2 GentooSwap
>
> Note: hda1, not just hda. You are labeling the filesystem on a
> partition, not the whole drive.

Would that work for raid-devices as well?

# /etc/fstab
/dev/md0 / ext4 noatime,nobarrier,nodiratime 0 1

Just curious ...

Umm, why not try it?

# e2label /dev/md0 gentooRoot
# ls /dev/disk/by-label/gentooRoot -l
lrwxrwxrwx 1 root root 9 27. Aug 12:14 /dev/disk/by-label/gentooRoot ->
../../md0

cool ...

thx, Stefan
 
Old 08-27-2010, 10:21 AM
Dale
 
Default Old IDE drives and the "newer" PATA kernel drivers

J. Roeleveld wrote:

On Friday 27 August 2010 11:49:00 Dale wrote:


J. Roeleveld wrote:

Hmmm, I use resierfs for my file systems, most of them anyway. I still

use e2fsprogs to change those?


Nope:
eve ~ # reiserfstune --help
reiserfstune: unrecognized option '--help'
reiserfstune: Usage: reiserfstune [options] device [block-count]

Options:

-j | --journal-device file current journal device
--journal-new-device file new journal device
-o | --journal-new-offset N new journal offset in blocks
-s | --journal-new-size N new journal size in blocks
-t | --trans-max-size N new journal max transaction size in blocks
--no-journal-available current journal is not available
--make-journal-standard new journal to be standard
-b | --add-badblocks file add to bad block list
-B | --badblocks file set the bad block list
-u | --uuid UUID|random set new UUID
-l | --label LABEL set new label
-f | --force force tuning, less confirmations
-V print version and exit

IOW (as example):
reiserfstune -l ROOTDISK /dev/hda1



Is there a way to boot a Gentoo/Knoppix CD and make it use the PATA
drivers? That way I can boot it and see exactly how it will name them
and what drive is what without actually changing anything at all. Is
there a boot option "noide" or some other switch I can use?


Afraid not.
The naming scheme is, officially, not constant and can change with reboots.

On my server, with hotswap, I get different device-names when I remove a disk
and plug it back in.
Eg. /dev/sdb -> /dev/sdj
(as example)
Don't think you'll have that particular issue, but having these names change
between reboots is possible. Especially if a drive fails and is not found
during boot or a new drive is added.

Not tested, but I believe USB-drives might also get pushed into the mix?

--
Joost





I do know the USB stuff changes but I wasn't sure about the others. I
would think the main drives in a system would come first but one could
never make that promise. I'm giving serious thought to using the
labels. It would also mean that I don't have to remember what partition
is what. Currently I would mount and then list what is in the directory
to see what is in it and figure out what it is. With the labels
feature, even fdisk would tell me what is what.


This would be a good time to move the OS to a new drive. If things work
out, run from the new drive. If things blow up, boot the old drive with
the old kernel, old fstab and other settings.


Thanks.

Dale

:-) :-)
 
Old 08-27-2010, 10:23 AM
Dale
 
Default Old IDE drives and the "newer" PATA kernel drivers

Nikos Chantziaras wrote:

On 08/27/2010 12:49 PM, Dale wrote:

Is there a way to boot a Gentoo/Knoppix CD and make it use the PATA
drivers? That way I can boot it and see exactly how it will name them
and what drive is what without actually changing anything at all. Is
there a boot option "noide" or some other switch I can use?


You do the labeling *before* you switch to the new kernel. Once you
get it working correctly with your current kernel, then you can
upgrade to the new ATA drivers and it will just work (which is the
whole point of this exercise.)




I hadn't thought of that feature. It should work regardless of which
kernel I boot, either the old IDE drivers or the new PATA drivers. Cool !!!


Time to start taking notes and putting ducks beaks to duck tails.

Dale

:-) :-)
 
Old 08-27-2010, 12:32 PM
Dale
 
Default Old IDE drives and the "newer" PATA kernel drivers

Alex Schuster wrote:

Dale writes:



Hmmm, I use resierfs for my file systems, most of them anyway. I still
use e2fsprogs to change those?


No, but you can use reiserfstune -l.



Is there a way to boot a Gentoo/Knoppix CD and make it use the PATA
drivers? That way I can boot it and see exactly how it will name them
and what drive is what without actually changing anything at all. Is
there a boot option "noide" or some other switch I can use?


Don't know. But even if so the result is not cecessarily accurate.

My two SATA drives were sd[ab], but when I added two PATA drives those got
these names, and the SATA ones became sa[cd]. But even this changes, with
a kernel derived from GRML, the PATA ones were sd[bc], and the SATA ones
sd[ad]. Weird, huh? And things become even mor eunpredictable when I have
USB drives plugged in during boot. So I also suggest using labels or
UUIDs.

My own method is yet another one. As I have everything on LVM (except for
the /boot partitino, which is on an USB stick), my drives are identified
by their volume group. /dev/weird is the system drive, /dev/weird2 is the
identical backup drive. This way I do not have any /dev/sdX in either
fstab or grub.conf. And when the system drive fails, I vgrename wird2 to
weird, and then the backup drive will become the system drive.

Wonko




It would be nice if something like *fdisk could edit the labels tho. It
would be so much easier. I didn't see anything in the man pages tho.


I looked into LVM a good while ago. It's just to much for me to keep up
with since I just have a desktop system here. It has its good points
but just way overkill for what I have here.


It seems as time goes on, things get more complicated. lol

Dale

:-) :-)
 
Old 08-27-2010, 03:57 PM
Bill Longman
 
Default Old IDE drives and the "newer" PATA kernel drivers

On 08/27/2010 01:10 AM, J. Roeleveld wrote:
> On Friday 27 August 2010 09:49:41 Nikos Chantziaras wrote:
>> Anyway, make sure you have a bootable Linux CD/DVD handy. That way, you
>> won't be able to blow anything up and can boot from it in order to
>> change your /etc/fstab and grub conf.
>
> Alternatively, give your partitions Labels and reconfigure /etc/fstab to use
> those.
> Then you don't have to worry about the changes to the device-names.

I second Joost's recommendation. I don't think you can use labels on the
kernel command line, so your grub will have to know for sure which
device to boot.
 
Old 08-27-2010, 04:02 PM
"J. Roeleveld"
 
Default Old IDE drives and the "newer" PATA kernel drivers

On Friday 27 August 2010 17:57:01 Bill Longman wrote:
> On 08/27/2010 01:10 AM, J. Roeleveld wrote:
> > On Friday 27 August 2010 09:49:41 Nikos Chantziaras wrote:
> >> Anyway, make sure you have a bootable Linux CD/DVD handy. That way, you
> >> won't be able to blow anything up and can boot from it in order to
> >> change your /etc/fstab and grub conf.
> >
> > Alternatively, give your partitions Labels and reconfigure /etc/fstab to
> > use those.
> > Then you don't have to worry about the changes to the device-names.
>
> I second Joost's recommendation. I don't think you can use labels on the
> kernel command line, so your grub will have to know for sure which
> device to boot.

Actually, you can:
http://www.ibm.com/developerworks/linux/library/l-boot-rootfs/index.html

(Read the section below "Use a label"):

fstab:
LABEL=ROOT / ext3 defaults 1 1
LABEL=BOOT /boot ext3 defaults 1 2
LABEL=SWAP swap swap defaults 0 0
LABEL=HOME /home ext3 nosuid,auto 1 2


grub:
title Linux
root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=LABEL=ROOT rhgb quiet
initrd (hd0,0)/initrd-2.x.x-xx.img

Not tested it myself yet, but I think this doesn't require special patches

--
Joost
 
Old 08-27-2010, 04:03 PM
Bill Longman
 
Default Old IDE drives and the "newer" PATA kernel drivers

On 08/27/2010 01:50 AM, Nikos Chantziaras wrote:
> On 08/27/2010 10:37 AM, Dale wrote:
>> I been putting this off but it looks like the newer kernels are going to
>> push me to changing this real soon. I have a older system, Abit NF7 2.0
>> motherboard with the older IDE drives. I'm still using the older IDE
>> drivers. This is what I have currently:
>>
>> hda Actual hard drive OS on this
>> hdb Actual hard drive Not in use
>> hdc Actual hard drive home partition
>> hdd DVD burner Duh! It's a burner.
>> sda Actual hard drive connected through a SATA PCI card. Misc stuff.
>
> The advice by the other posters to label your disks is a good one. I'm
> using labels too. Not sure why I didn't think to mention it :P
>
> Applying labels to your filesystems is trivial. Simply use the e2label
> utility (it's in the sys-fs/e2fsprogs package and installed by default,
> so there's nothing new to emerge). For example, if your hda1 is your
> root partition and your hda2 your swap, you can label them like this:
>
> e2label /dev/hda1 GentooRoot
> e2label /dev/hda2 GentooSwap
>
> Note: hda1, not just hda. You are labeling the filesystem on a
> partition, not the whole drive.
>
> After you label all your filesystems, you simply modify your /etc/fstab
> like this:
>
> Before:
> /dev/hda1 / ext4 noatime 0 1
> /dev/hda2 none swap sw 0 0
>
> After:
> /dev/disk/by-label/GentooRoot / ext4 noatime 0 1
> /dev/disk/by-label/GentooSwap none swap sw 0 0
>
> That is, you simply change "/dev/blah" to
> "/dev/disk/by-label/DriveLabel" and that's it.

Yet another way to use labels:

When you make the filesystem, apply the name then i.e.:

mke2fs -j -L SpeedySSD /dev/sde1

then in your /etc/fstab use the label like this:

LABEL=SpeedySSD /usr/home ext3 relatime 0 2
 
Old 08-27-2010, 04:06 PM
Nikos Chantziaras
 
Default Old IDE drives and the "newer" PATA kernel drivers

On 08/27/2010 07:02 PM, J. Roeleveld wrote:

On Friday 27 August 2010 17:57:01 Bill Longman wrote:

On 08/27/2010 01:10 AM, J. Roeleveld wrote:

On Friday 27 August 2010 09:49:41 Nikos Chantziaras wrote:

Anyway, make sure you have a bootable Linux CD/DVD handy. That way, you
won't be able to blow anything up and can boot from it in order to
change your /etc/fstab and grub conf.


Alternatively, give your partitions Labels and reconfigure /etc/fstab to
use those.
Then you don't have to worry about the changes to the device-names.


I second Joost's recommendation. I don't think you can use labels on the
kernel command line, so your grub will have to know for sure which
device to boot.


Actually, you can:
http://www.ibm.com/developerworks/linux/library/l-boot-rootfs/index.html

(Read the section below "Use a label"):

fstab:
LABEL=ROOT / ext3 defaults 1 1
LABEL=BOOT /boot ext3 defaults 1 2
LABEL=SWAP swap swap defaults 0 0
LABEL=HOME /home ext3 nosuid,auto 1 2


This syntax never worked here. Always resulted in an unbootable system.
Only the /dev/disk/by-label/ syntax works reliably.
 

Thread Tools




All times are GMT. The time now is 11:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org