From owner-freebsd-hackers Fri Sep 1 02:49:19 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id CAA24433 for hackers-outgoing; Fri, 1 Sep 1995 02:49:19 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id CAA24412 for ; Fri, 1 Sep 1995 02:49:09 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id LAA14397 for ; Fri, 1 Sep 1995 11:23:30 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id LAA18361; Fri, 1 Sep 1995 11:22:08 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id KAA03027; Fri, 1 Sep 1995 10:02:27 +0200 From: J Wunsch Message-Id: <199509010802.KAA03027@uriah.heep.sax.de> Subject: Re: can swap space be shared with other OSes? To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Fri, 1 Sep 1995 10:02:26 +0200 (MET DST) Cc: leisner@sdsp.mc.xerox.com Reply-To: freebsd-hackers@freebsd.org (FreeBSD hackers) In-Reply-To: <199508312321.QAA01188@ref.tfs.com> from "Julian Elischer" at Aug 31, 95 04:21:42 pm Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1590 Sender: hackers-owner@freebsd.org Precedence: bulk As Julian Elischer wrote: > > > I believe a similar scheme would work for an unknown partition ID, for > > instance the Linux swap -- assuming each DOS partition gets a logical > > device regardless of whether we recognize the ID or not. This is > > something that should be done if it hasn't been already. > I believe it will work.. > swapon /dev/sd0s3 would swap onto the 3rd slice... > if that was the linux swap slice..... It doesn't. See my recent discussion about this topic in -current. (Reminder: i've bought an second-hand disk for my notebook, and it came with an installed Linux from the previous owner, which i decided to keep.) Either Linux as FreeBSD insist on finding some `magic' on the slice they're using as swap area. For Linux, this is arranged by the Linux swap slice ID (0x81?) and the `mkswap' command, while FreeBSD requires a 0xa5 slice ID and a correct disklabel (that should cover the entire slice, and have a `b' partition also using the entire slice). So by now i use some hackery inside /etc/rc that runs fdisk and mkswap whenever Linux is about to be booted, and fdisk plus disklabel for FreeBSD. Needless to say, the slice must be behind the FreeBSD root (and /usr, for that matter) slice, since FreeBSD's boot loader does only boot off the ``compatibility slice'', i.e. the first 0xa5 slice found in the fdisk table. (Only the order in the fdisk table is important, the order on the disk is irrelevant.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)