From patchwork Tue Sep 1 05:38:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11747371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66C0513B6 for ; Tue, 1 Sep 2020 05:38:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F32B2098B for ; Tue, 1 Sep 2020 05:38:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tuSpFvkB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgIAFig (ORCPT ); Tue, 1 Sep 2020 01:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgIAFif (ORCPT ); Tue, 1 Sep 2020 01:38:35 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58CF5C061290; Mon, 31 Aug 2020 22:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=0zemR9R4/VH69rJ6GlaHFni0BDRWTXD6MEBJ9YyD5nQ=; b=tuSpFvkBIzzptspwfS85ssJACe S+dO7dWu/EeQdcrsjpDDwYWkLIgsNOOA9pVe2c201Tzon6cN+mZFf1LaHBl2oY2I+Bu+dqG3DUg2+ uqjDohLkzpV9If9/riS4hg9/Lq2MZncXrYA+xhSqxnrVZP54aLpXoGOFN342nzt9SiVMJJE3YB1K7 pqPU0DY5X25Yf37nlgz74ksTVUXZxCWCFGhcs/8+uCABUXDrWJCyQCG7tMob5DJuhNNOSqLLeniBR rZGJ2Dfc9tp3k1BVxDmftCqKLiMMHG0mBoxR6hINcDePRdmn+55S+QGi4foaiyWpiOrd4SKbvJPJC GD8x3Bdg==; Received: from [2601:1c0:6280:3f0:897c:6038:c71d:ecac] (helo=smtpauth.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCz05-0000U6-0y; Tue, 01 Sep 2020 05:38:33 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Karel Zak , Paul Gortmaker , Jens Axboe , linux-block@vger.kernel.org, Alexander Viro , Martin Mares , linux-video@atrey.karlin.mff.cuni.cz, "H. Peter Anvin" , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [RFC PATCH 1/2] Documentation/admin-guide: README & svga: remove use of "rdev" Date: Mon, 31 Aug 2020 22:38:21 -0700 Message-Id: <20200901053822.9374-2-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200901053822.9374-1-rdunlap@infradead.org> References: <20200901053822.9374-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org "rdev" is considered antiquated, ancient, archaic, obsolete, deprecated {choose any or all}. Remove use of "rdev" and "vidmode" (a symlink to rdev) in admin-guide/README.rst and admin-guide/svga.rst. "rdev" was removed from util-linux in 2010: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=a3e40c14651fccf18e7954f081e601389baefe3f Signed-off-by: Randy Dunlap Cc: Karel Zak Cc: Paul Gortmaker Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Alexander Viro Cc: Martin Mares Cc: linux-video@atrey.karlin.mff.cuni.cz Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- No email address for these: nCc: Werner Almesberger nCc: Stephen Tweedie nCc: Peter MacDonald Documentation/admin-guide/README.rst | 6 +++--- Documentation/admin-guide/svga.rst | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) --- linux-next-20200828.orig/Documentation/admin-guide/README.rst +++ linux-next-20200828/Documentation/admin-guide/README.rst @@ -322,9 +322,9 @@ Compiling the kernel reboot, and enjoy! If you ever need to change the default root device, video mode, - ramdisk size, etc. in the kernel image, use the ``rdev`` program (or - alternatively the LILO boot options when appropriate). No need to - recompile the kernel to change these parameters. + etc. in the kernel image, use your bootloader's boot options + where appropriate. No need to recompile the kernel to change + these parameters. - Reboot with the new kernel and enjoy. --- linux-next-20200828.orig/Documentation/admin-guide/svga.rst +++ linux-next-20200828/Documentation/admin-guide/svga.rst @@ -12,7 +12,7 @@ Intro This small document describes the "Video Mode Selection" feature which allows the use of various special video modes supported by the video BIOS. Due to usage of the BIOS, the selection is limited to boot time (before the -kernel decompression starts) and works only on 80X86 machines. +kernel decompression starts) and works only on 32-bit 80X86 machines. .. note:: @@ -23,7 +23,7 @@ kernel decompression starts) and works o The video mode to be used is selected by a kernel parameter which can be specified in the kernel Makefile (the SVGA_MODE=... line) or by the "vga=..." -option of LILO (or some other boot loader you use) or by the "vidmode" utility +option of LILO (or some other boot loader you use) or by the "xrandr" utility (present in standard Linux utility packages). You can use the following values of this parameter:: @@ -41,7 +41,7 @@ of this parameter:: better to use absolute mode numbers instead. 0x.... - Hexadecimal video mode ID (also displayed on the menu, see below - for exact meaning of the ID). Warning: rdev and LILO don't support + for exact meaning of the ID). Warning: LILO doesn't support hexadecimal numbers -- you have to convert it to decimal manually. Menu From patchwork Tue Sep 1 05:38:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11747373 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A0E0722 for ; Tue, 1 Sep 2020 05:38:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D6D521548 for ; Tue, 1 Sep 2020 05:38:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SNGPMTiJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgIAFil (ORCPT ); Tue, 1 Sep 2020 01:38:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgIAFij (ORCPT ); Tue, 1 Sep 2020 01:38:39 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67555C061290; Mon, 31 Aug 2020 22:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=80mHTn31aHCL/8XD5wYu0PJaFNajTzgos6luJ5PtEyc=; b=SNGPMTiJOVg9hCVs3/7gs4UM+Q G+BZjNm3L30SIDj6kD5rk+f/laUkl4CAkwDdI2rNot3FeZ1T+m9+zagwExaI4ov/6lSrxLcw6bYte vsPvpXDTSmjrwVLXvKloq3+4zDKyYQUt7LXpW06yOdw94QSl9ITn3/OTdQa/3zOxmZNcnqhWEtbcc mgdDu27QAxSVj65W8a2ugLCr309J+nfl9ZfHCKR4ZqGupNOFSRhjTqJ92Z6ikhDa03LneEUpfPteK /bBIsQrmLF34a+SA0/Ps1Z5rHkyEXbg6PHkKUXZk18K9UTt4uWlCHyrjE39uqFaaVKJ7I4SNCdXck bkvdYDsQ==; Received: from [2601:1c0:6280:3f0:897c:6038:c71d:ecac] (helo=smtpauth.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCz09-0000U6-0Z; Tue, 01 Sep 2020 05:38:37 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Karel Zak , Paul Gortmaker , Jens Axboe , linux-block@vger.kernel.org, Alexander Viro , Martin Mares , linux-video@atrey.karlin.mff.cuni.cz, "H. Peter Anvin" , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [RFC PATCH 2/2] Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev" Date: Mon, 31 Aug 2020 22:38:22 -0700 Message-Id: <20200901053822.9374-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200901053822.9374-1-rdunlap@infradead.org> References: <20200901053822.9374-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Remove use of "rdev" from blockdev/ramdisk.rst and update admin-guide/kernel-parameters.txt. "rdev" is considered antiquated, ancient, archaic, obsolete, deprecated {choose any or all}. "rdev" was removed from util-linux in 2010: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=a3e40c14651fccf18e7954f081e601389baefe3f Signed-off-by: Randy Dunlap Cc: Karel Zak Cc: Paul Gortmaker Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Alexander Viro Cc: Martin Mares Cc: linux-video@atrey.karlin.mff.cuni.cz Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- No email address for these: nCc: Werner Almesberger nCc: Stephen Tweedie nCc: Peter MacDonald Documentation/admin-guide/blockdev/ramdisk.rst | 70 ++++---------- Documentation/admin-guide/kernel-parameters.txt | 9 - 2 files changed, 27 insertions(+), 52 deletions(-) --- linux-next-20200828.orig/Documentation/admin-guide/blockdev/ramdisk.rst +++ linux-next-20200828/Documentation/admin-guide/blockdev/ramdisk.rst @@ -6,7 +6,7 @@ Using the RAM disk block device with Lin 1) Overview 2) Kernel Command Line Parameters - 3) Using "rdev -r" + 3) Using "rdev" 4) An Example of Creating a Compressed RAM Disk @@ -59,51 +59,27 @@ default is 4096 (4 MB). rd_size See ramdisk_size. -3) Using "rdev -r" ------------------- +3) Using "rdev" +--------------- -The usage of the word (two bytes) that "rdev -r" sets in the kernel image is -as follows. The low 11 bits (0 -> 10) specify an offset (in 1 k blocks) of up -to 2 MB (2^11) of where to find the RAM disk (this used to be the size). Bit -14 indicates that a RAM disk is to be loaded, and bit 15 indicates whether a -prompt/wait sequence is to be given before trying to read the RAM disk. Since -the RAM disk dynamically grows as data is being written into it, a size field -is not required. Bits 11 to 13 are not currently used and may as well be zero. -These numbers are no magical secrets, as seen below:: - - ./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF - ./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 - ./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 - -Consider a typical two floppy disk setup, where you will have the -kernel on disk one, and have already put a RAM disk image onto disk #2. - -Hence you want to set bits 0 to 13 as 0, meaning that your RAM disk -starts at an offset of 0 kB from the beginning of the floppy. -The command line equivalent is: "ramdisk_start=0" - -You want bit 14 as one, indicating that a RAM disk is to be loaded. -The command line equivalent is: "load_ramdisk=1" - -You want bit 15 as one, indicating that you want a prompt/keypress -sequence so that you have a chance to switch floppy disks. -The command line equivalent is: "prompt_ramdisk=1" - -Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word. -So to create disk one of the set, you would do:: - - /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0 - /usr/src/linux# rdev /dev/fd0 /dev/fd0 - /usr/src/linux# rdev -r /dev/fd0 49152 +"rdev" is an obsolete, deprecated, antiquated utility that could be used +to set the boot device in a Linux kernel image. -If you make a boot disk that has LILO, then for the above, you would use:: +Instead of using rdev, just place the boot device information on the +kernel command line and pass it to the kernel from the bootloader. + +You can also pass arguments to the kernel by setting FDARGS in +arch/x86/boot/Makefile and specify in initrd image by setting FDINITRD in +arch/x86/boot/Makefile. - append = "ramdisk_start=0 load_ramdisk=1 prompt_ramdisk=1" +Some of the kernel command line boot options that may apply here are:: -Since the default start = 0 and the default prompt = 1, you could use:: + ramdisk_start=N + ramdisk_size=M - append = "load_ramdisk=1" +If you make a boot disk that has LILO, then for the above, you would use:: + append = "ramdisk_start=N ramdisk_size=M" 4) An Example of Creating a Compressed RAM Disk ----------------------------------------------- @@ -151,12 +127,9 @@ f) Put the RAM disk image onto the flopp dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400 -g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. - For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would - have 2^15 + 2^14 + 400 = 49552:: - - rdev /dev/fd0 /dev/fd0 - rdev -r /dev/fd0 49552 +g) Make sure that you have already specified the boot information in + FDARGS and FDINITRD or that you use a bootloader to pass kernel + command line boot options to the kernel. That is it. You now have your boot/root compressed RAM disk floppy. Some users may wish to combine steps (d) and (f) by using a pipe. @@ -167,11 +140,14 @@ users may wish to combine steps (d) and Changelog: ---------- +09-2020 : + + Removed usage of "rdev" + 10-22-04 : Updated to reflect changes in command line options, remove obsolete references, general cleanup. James Nelson (james4765@gmail.com) - 12-95 : Original Document --- linux-next-20200828.orig/Documentation/admin-guide/kernel-parameters.txt +++ linux-next-20200828/Documentation/admin-guide/kernel-parameters.txt @@ -2441,8 +2441,7 @@ memblock=debug [KNL] Enable memblock debug messages. - load_ramdisk= [RAM] List of ramdisks to load from floppy - See Documentation/admin-guide/blockdev/ramdisk.rst. + load_ramdisk= [RAM] [Deprecated] lockd.nlm_grace_period=P [NFS] Assign grace period. Format: @@ -3925,9 +3924,7 @@ Param: - step/bucket size as a power of 2 for statistical time based profiling. - prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk - before loading. - See Documentation/admin-guide/blockdev/ramdisk.rst. + prompt_ramdisk= [RAM] [Deprecated] prot_virt= [S390] enable hosting protected virtual machines isolated from the hypervisor (if hardware supports @@ -3985,6 +3982,8 @@ ramdisk_size= [RAM] Sizes of RAM disks in kilobytes See Documentation/admin-guide/blockdev/ramdisk.rst. + ramdisk_start= [RAM] RAM disk image start address + random.trust_cpu={on,off} [KNL] Enable or disable trusting the use of the CPU's random number generator (if available) to