From: markus reichelt <ml@bitfalle.org>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: The naming wars continue...
Date: Sat, 23 Oct 2004 15:18:19 +0000 [thread overview]
Message-ID: <20041023151819.GB2540@dantooine> (raw)
In-Reply-To: <Pine.LNX.4.58.0410221431180.2101@ppc970.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
Linus Torvalds <torvalds@osdl.org> wrote:
> (*) In other words, I had a beer and watched TV. Mmm... Donuts.
seems to be a good opportunity even though I'm a bit late, but could
you please include this patch, written by Heikki Linnakangas?
http://mareichelt.de/pub/boot-off-usb/boot-off-usb-2.patch
applies cleanly to 2.6.7 vanilla, thus making boot off usb devices
possible
--
Bastard Administrator in $hell
[-- Attachment #2: boot-off-usb-2.patch --]
[-- Type: text/plain, Size: 4552 bytes --]
diff -c init/do_mounts.c init.orig/do_mounts.c
*** init/do_mounts.c Tue Oct 5 22:16:54 2004
--- init.orig/do_mounts.c Wed Jun 16 08:19:13 2004
***************
*** 272,285 ****
return 0;
}
! static int first_try = 1;
!
! int __init mount_block_root(char *name, int flags)
{
char *fs_names = __getname();
char *p;
char b[BDEVNAME_SIZE];
- int success;
get_fs_names(fs_names);
retry:
--- 272,282 ----
return 0;
}
! void __init mount_block_root(char *name, int flags)
{
char *fs_names = __getname();
char *p;
char b[BDEVNAME_SIZE];
get_fs_names(fs_names);
retry:
***************
*** 287,293 ****
int err = do_mount_root(name, p, flags, root_mount_data);
switch (err) {
case 0:
- success = 1;
goto out;
case -EACCES:
flags |= MS_RDONLY;
--- 284,289 ----
***************
*** 295,320 ****
case -EINVAL:
continue;
}
! /* Print out a warning on the first attempt */
! if(first_try) {
! first_try = 0;
! /*
! * Allow the user to distinguish between failed sys_open
! * and bad superblock on root device.
! */
! __bdevname(ROOT_DEV, b);
!
! printk("VFS: Cannot open root device \"%s\" or %s\n",
root_device_name, b);
! printk("Retrying. Please verify the \"root=\" boot option.\n");
! }
! success = 0;
! goto out;
}
panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b));
out:
putname(fs_names);
- return success;
}
#ifdef CONFIG_ROOT_NFS
--- 291,310 ----
case -EINVAL:
continue;
}
! /*
! * Allow the user to distinguish between failed sys_open
! * and bad superblock on root device.
! */
! __bdevname(ROOT_DEV, b);
! printk("VFS: Cannot open root device \"%s\" or %s\n",
root_device_name, b);
! printk("Please append a correct \"root=\" boot option\n");
!
! panic("VFS: Unable to mount root fs on %s", b);
}
panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b));
out:
putname(fs_names);
}
#ifdef CONFIG_ROOT_NFS
***************
*** 360,366 ****
}
#endif
! int __init mount_root(void)
{
#ifdef CONFIG_ROOT_NFS
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
--- 350,356 ----
}
#endif
! void __init mount_root(void)
{
#ifdef CONFIG_ROOT_NFS
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
***************
*** 384,390 ****
}
#endif
create_dev("/dev/root", ROOT_DEV, root_device_name);
! return mount_block_root("/dev/root", root_mountflags);
}
/*
--- 374,380 ----
}
#endif
create_dev("/dev/root", ROOT_DEV, root_device_name);
! mount_block_root("/dev/root", root_mountflags);
}
/*
***************
*** 398,427 ****
md_run_setup();
! do {
! if (saved_root_name[0]) {
! root_device_name = saved_root_name;
! ROOT_DEV = name_to_dev_t(root_device_name);
! if (strncmp(root_device_name, "/dev/", 5) == 0)
! root_device_name += 5;
! }
!
! is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
!
! if (initrd_load())
! break;
! if (is_floppy && rd_doload && rd_load_disk(0))
! ROOT_DEV = Root_RAM0;
! if(mount_root())
! break;
! /* Mounting root failed. Retry after a small delay */
! set_current_state(TASK_INTERRUPTIBLE);
! schedule_timeout(1*HZ);
! } while(1);
umount_devfs("/dev");
sys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot(".");
--- 388,410 ----
md_run_setup();
! if (saved_root_name[0]) {
! root_device_name = saved_root_name;
! ROOT_DEV = name_to_dev_t(root_device_name);
! if (strncmp(root_device_name, "/dev/", 5) == 0)
! root_device_name += 5;
! }
! is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
! if (initrd_load())
! goto out;
! if (is_floppy && rd_doload && rd_load_disk(0))
! ROOT_DEV = Root_RAM0;
+ mount_root();
+ out:
umount_devfs("/dev");
sys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot(".");
diff -c init/do_mounts.h init.orig/do_mounts.h
*** init/do_mounts.h Tue Oct 5 22:10:30 2004
--- init.orig/do_mounts.h Wed Jun 16 08:19:37 2004
***************
*** 11,18 ****
dev_t name_to_dev_t(char *name);
void change_floppy(char *fmt, ...);
! int mount_block_root(char *name, int flags);
! int mount_root(void);
extern int root_mountflags;
extern char *root_device_name;
--- 11,18 ----
dev_t name_to_dev_t(char *name);
void change_floppy(char *fmt, ...);
! void mount_block_root(char *name, int flags);
! void mount_root(void);
extern int root_mountflags;
extern char *root_device_name;
next prev parent reply other threads:[~2004-10-23 13:17 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 22:05 The naming wars continue Linus Torvalds
2004-10-22 22:44 ` Jan Engelhardt
2004-10-22 22:53 ` Clemens Schwaighofer
2004-10-22 23:13 ` Espen Fjellvær Olsen
2004-10-23 3:07 ` Randy.Dunlap
2004-10-22 22:56 ` Benjamin Herrenschmidt
2004-10-23 21:25 ` David Woodhouse
2004-10-25 21:44 ` Bill Davidsen
2004-10-26 1:27 ` Daniel Gryniewicz
2004-10-26 21:24 ` Bill Davidsen
2004-10-22 23:18 ` Grzegorz Kulewski
2004-10-22 23:46 ` Matt Mackall
2004-10-23 0:19 ` Con Kolivas
2004-10-23 1:15 ` William Lee Irwin III
2004-10-23 1:25 ` Linus Torvalds
2004-10-23 1:08 ` alan
2004-10-23 2:52 ` Matt Mackall
2004-10-23 1:38 ` Matt Mackall
2004-10-23 1:49 ` Linus Torvalds
2004-10-29 18:33 ` cliff white
2004-10-23 3:03 ` Wakko Warner
2004-10-24 13:33 ` Helge Hafting
2004-10-25 23:26 ` Tonnerre
2004-10-26 6:37 ` H. Peter Anvin
2004-10-26 7:32 ` Denis Vlasenko
2004-10-26 11:12 ` Geert Uytterhoeven
2004-10-26 11:43 ` Denis Vlasenko
2004-10-26 20:31 ` Tonnerre
2004-10-27 4:21 ` H. Peter Anvin
2004-10-27 8:33 ` Denis Vlasenko
2004-10-27 15:48 ` Tonnerre
2004-10-27 16:11 ` [OT] " Grzegorz Kulewski
2004-10-27 16:14 ` Tonnerre
2004-10-27 16:42 ` Grzegorz Kulewski
2004-10-27 17:27 ` Måns Rullgård
2004-10-27 21:11 ` [uClibc] " Dave Dodge
2004-10-27 21:15 ` Måns Rullgård
2004-10-27 22:35 ` Dave Dodge
2004-10-27 23:04 ` Måns Rullgård
2004-10-29 14:46 ` Adrian Bunk
2004-10-27 19:17 ` Bill Davidsen
2004-10-27 19:40 ` H. Peter Anvin
2004-10-29 14:51 ` Adrian Bunk
2004-10-29 14:54 ` Geert Uytterhoeven
2004-10-29 15:11 ` Adrian Bunk
2004-10-27 20:13 ` The naming wars continue... [u] Martin Schlemmer [c]
2004-10-27 20:35 ` Randy.Dunlap
2004-10-27 21:35 ` Martin Schlemmer [c]
2004-10-26 16:26 ` The naming wars continue Tonnerre
2004-10-26 11:11 ` Geert Uytterhoeven
2004-10-26 16:22 ` Tonnerre
2004-10-23 6:20 ` Nick Piggin
2004-10-25 21:30 ` Bill Davidsen
2004-10-25 22:02 ` Linus Torvalds
2004-10-25 22:46 ` Hua Zhong
2004-10-27 7:38 ` Helge Hafting
2004-10-26 13:09 ` Giuseppe Bilotta
2004-10-27 0:40 ` H. Peter Anvin
2004-10-27 2:41 ` Marcos D. Marado Torres
2004-10-26 21:32 ` Bill Davidsen
2004-10-27 3:01 ` Marcos D. Marado Torres
2004-10-27 3:32 ` Barry K. Nathan
2004-10-27 19:23 ` Bill Davidsen
2004-10-27 7:37 ` Denis Vlasenko
2004-10-27 20:08 ` l_linux-kernel@mail2news.4t2.com
2004-10-27 20:27 ` Linus Torvalds
2004-10-27 21:13 ` Dave Airlie
2004-10-27 21:25 ` Linus Torvalds
2004-10-27 22:52 ` Jesper Juhl
2004-10-27 22:54 ` Dave Airlie
2004-10-27 23:14 ` Jesper Juhl
2004-10-23 15:41 ` Stephen Frost
2004-10-23 21:51 ` Matthias Schniedermeyer
2004-10-24 0:02 ` Stephen Frost
2004-10-24 3:29 ` Matthias Schniedermeyer
2004-10-24 5:02 ` Bernd Eckenfels
2004-10-25 23:34 ` Tonnerre
2004-10-26 17:52 ` William Lee Irwin III
2004-10-23 22:16 ` Alexandre Oliva
2004-10-23 22:45 ` Linus Torvalds
2004-10-24 8:52 ` Matthias Urlichs
2004-10-23 1:35 ` Matt Mackall
2004-10-23 14:34 ` William Lee Irwin III
2004-10-23 0:04 ` William Lee Irwin III
2004-10-23 0:43 ` Nigel Cunningham
2004-10-23 21:03 ` Christian Hesse
2004-10-24 0:47 ` Jon Masters
2004-10-23 2:37 ` The naming wars continue... - net/ipv4/netfilter/ipt_hashlimit.c does not build Eyal Lebedinsky
2004-10-23 3:04 ` Linus Torvalds
2004-10-23 11:23 ` The naming wars continue Erik Hensema
2004-10-23 13:21 ` Christoph Hellwig
2004-10-23 15:45 ` Hans Reiser
2004-10-23 15:18 ` markus reichelt [this message]
2004-10-23 14:46 ` Taso Hatzi
2004-10-24 15:54 ` generic hardirq code in 2.6.10-rc1 Christoph Hellwig
2004-10-25 6:02 ` Miles Bader
2004-10-25 12:36 ` Christoph Hellwig
2004-10-29 14:37 ` [patch] 2.6.10-rc1: SCSI aacraid warning Adrian Bunk
2004-10-29 14:45 ` Mark Haverkamp
2004-10-29 15:13 ` Mark Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2004-10-23 13:17 The naming wars continue Chuck Ebbert
2004-10-23 14:44 ` William Lee Irwin III
2004-10-26 6:03 Chuck Ebbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041023151819.GB2540@dantooine \
--to=ml@bitfalle.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox