on Wed, Nov 19, 2003 at 07:01:14AM -0800, Valentine Kouznetsov ([EMAIL PROTECTED]) 
wrote:
> Hi,
> I'm trying to migrate from RedHat to Debian and face out with few
> problems. I'll be glad to resolve them with your help.
> 
> Question about dpkg:

> 1) dpkg is great, but I cannot figure out one simple/usefull
> procedure. Let's assume I install one package and have file
> /usr/bin/my. Is is possible to figure out using dpkg or similar tool
> to which package /usr/bin/my belong to. On RedHat I just invoke rpm
> -qf /usr/bin/my and get back package name. 

    $ dpkg -S <name of file>

For files not installed on your system:

    # apt-get install apt-file
    # apt-file update
    # apt-file search <name of file>

...this can be handy when trying to track down source dependencies for
packages you're installing from source tarballs.  See also auto-apt, an
in particular its 'shell' option, which is downright spooky.


> 2) Is it possible to check status of installed software, what has been
> changed from original package, etc. On RedHat it is rpm -V <package>

See:  debsums.

This functionality isn't quite the same under Debian as under RH.  Not
all packages have md5sum hashes on all files.  And there's simply too
much changing of some system files (generally config files in /etc) in
any event for _either_ rpm -V or debsums to be truly useful.  For high
levels of security, a tripwire-like system, or nonvolatile media (read:
bootable CDROM) is a more practical solution.


> Questions about kernel:

> This is very weird, but I can't get cdrom working with my custom
> kernel. Here what I did.
>     apt-get install kernel-source-2.4.22
>     apt-get install kernel-patch-2.4.22
>     unpack kernel, applied debian patches
>     (/usr/src/kernel-patch/all/2.4.22/apply/debian), 
> then applied other patches, in particular swsuspend. Then I configure
> my kernel as necessary with config from either RedHat or Debian, The
> only basic difference I made is instead of compiling as modules
> CONFIG_IDE, CONFIG_BLK_DEV_IDE, CONFIG_BLK_DEV_IDEDISK I put then to
> be compiled into kernel. Well, install kernel and got surprise that
> mounting cdrom I have "can't read superblock".  Any ideas?

Failure to configure ISO9660 filesystem?

In virtually all cases, a stock Debian kernel will work for you.  If you
must compile your own, by all means do, but look at what modules you're
loading first as a guide to what you should compile into your kernel or
as modules.  You also want to look at the make-kpkg package.  Several
good user guides may be found through Google.


> Question about configuration:

> Where the natural place to put my own scripts while booting to Debian.
> On RedHat it was /etc/rc.d/rc.local What is equivalent on Debian?

Create your own file(s) under /etc/init.d/ .  See /etc/init.d/README and
referenced docs, as well as /etc/init.d/skeleton.  In the past, I've
suggested "local-<foo>" as a reserved namespace, such that you wouldn't,
say, have your own apache config script overwritten by a Debian package
install (you'd be prompted for the overwrite, but mistakes happen).
Though this was mentioned in LWN at the time, it hasn't been formally
adopted.  As a practical matter, this should be a safe namespace.

There is no 'rc.locale' in Debian, though you could certainly create
one.

> About runlevels, what the meaning of 2,3,4,5 runlevels on Debian. On
> RedHat 3 is equivalent to 2 on Debian?

One differenct between RH and Debian is that the X display manager
startup is managed by the SysV init scripts, rather than by
/etc/inittab.  Another is that in Debian, you generally install or
remove packages as you need or don't need them.  Hence, if you don't
want your system booting to an X display manager (xdm, gdm, kdm, wdm,
etc.), you remove the relevant package (though you can also configure
one or more to behave differently by several means).  

Too, RH's package management makes installation/removal of single
packages significantly more difficult due to a vastly inferior
dependencies management infrastructure.  Hence, many RH systems are
"kitchen sink" installs.  By contrast, most Debian systems have just the
set of packages needed for a particular task or suiting the user's
needs.

Result:  there's no default distinction between Debian runlevels 2, 3,
4, and 5.  If you *want* to set these differently, you can do so with
the 'udate-rc.d' command.  It's one of a set of admin tools matching
update-*, take a look at this and the others.  update-rc.d roughly
corresponds to RH's chkconfig.

If you want to start/stop an installed X display manager, rather than
switching runlevels, you'd issue a '/etc/init.d/[gkwx]dm (start|stop)'
command.


Peace.

-- 
Karsten M. Self <[EMAIL PROTECTED]>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    "Life," said Marvin, "don't talk to me about life."
    -- HHGTG

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to