search for: root_device

Displaying 20 results from an estimated 42 matches for "root_device".

2010 Oct 27
0
[PATCH node] add uninstall module
...;findfs LABEL=RootNew 2>&1 >/dev/null") + if rc == 0: + root2 = "RootNew" + + root_label_lookup_cmd = "findfs LABEL=Root" + root_label_lookup = subprocess.Popen(root_label_lookup_cmd, shell=True, stdout=PIPE, stderr=STDOUT) + root_device = root_label_lookup.stdout.read() + if root_device is None: + log("Can't find Root device") + sys.exit(2) + root_dev, root_part = get_part_info(root_device) + + root2_label_lookup_cmd = "findfs LABEL=" + root2 + root2_label_...
2019 Aug 17
2
Giving full administrator privileges through sudo on production systems
...random users? >> > > > $ sudo rm -rf / > I like this one. Long-long ago it was one of the ?tricky? questions at the UNIX admin test (exam). Basically, no matter how devastating that may sound, the command only will remove what is (alphabetically it was that time) before /dev/[root_device]. Once the device root filesystem lives on is removed from /dev, no further damage is done. So, you will be able to mount drive on another machine and get your /etc, /home, /var, /usr/local intact ;-) Asking that question other people gave me (an them usually) a lot of fun. Valeri > $ sudo &lt...
2009 Jul 20
1
[PATCH] Replace 'distrofamily' with feature tags
...print $os->{distro}, " " if exists $os->{distro}; print $os->{version}, " " if exists $os->{version}; - print "(".$os->{distrofamily}." family)", " " if exists $os->{distrofamily}; print "on ", $os->{root_device}, ":\n"; print __" Mountpoints:\n"; @@ -444,8 +443,9 @@ sub output_xml_os foreach ( [ "name" => "os" ], [ "distro" => "distro" ], - [ "distrofamily" => "distrofamily"...
2009 Jul 21
1
[PATCH] Split $os->{version} into $os->{major_version} and $os->{minor_version}
...distro}; - print $os->{version}, " " if exists $os->{version}; + print $os->{major_version} if exists $os->{major_version}; + print ".", $os->{minor_version} if exists $os->{minor_version}; + print " "; print "on ", $os->{root_device}, ":\n"; print __" Mountpoints:\n"; @@ -448,7 +450,8 @@ sub output_xml_os foreach ( [ "name" => "os" ], [ "distro" => "distro" ], - [ "version" => "version" ], +...
2010 Aug 03
1
[PATCH] Fix mkinitrd detection of LVM root on RHEL 4
...initrd, and is therefore extremely nasty + # and applicable only to a particular version of mkinitrd. + if ($desc->{distro} eq 'rhel' && $desc->{major_version} eq '4') { + push(@env, 'root_lvm=1') if ($g->is_lv($desc->{root_device})); + } + + $g->sh(join(' ', @env).' /sbin/mkinitrd '.join(' ', @module_args). + " $initrd $version"); } else { -- 1.7.2
2009 Jul 16
1
[REPOST] Differentiate 'distro' and 'distrofamily' in Sys::Guestfs::Lib
I was slightly too quick off the marks with the first patch. This updated patch modifies all of virt-inspector's output types to take account of distrofamily.
2005 Mar 29
3
Query regarding initramfs
Hi 1. Is it possible to load an initrd from initramfs ? How would you do this if the initramfs is being loaded dynamically in the kernel (ie having the initramfs as initrd ) Because in this case, you will say root = /dev/initrd and specify 'initrd' as your 'initramfs source file' How will you specify the second initrd source? Thanks Rachita.
2008 Dec 10
6
[PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
...ldn't that make it completely generic, without any virtio specific hacks? Yeah, that sounds much better - a minor detail is that it'd be better to hang the symlink off each virtio implementation's root object rather than off each device. To that end, I've hacked up register_virtio_root_device() which fixes the fact that we statically allocate root objects and gives us a sane place to add this generic symlink. It might make sense to add this to the core, though - e.g. device_register_root() - and that would also allow us use the same approach as module_add_driver() to add the module sym...
2008 Dec 10
6
[PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
...ldn't that make it completely generic, without any virtio specific hacks? Yeah, that sounds much better - a minor detail is that it'd be better to hang the symlink off each virtio implementation's root object rather than off each device. To that end, I've hacked up register_virtio_root_device() which fixes the fact that we statically allocate root objects and gives us a sane place to add this generic symlink. It might make sense to add this to the core, though - e.g. device_register_root() - and that would also allow us use the same approach as module_add_driver() to add the module sym...
2015 Jun 23
0
[PATCH 3/7] daemon: Add --cmdline option for testing.
...}, { "help", 0, 0, '?' }, { "verbose", 0, 0, 'v' }, { 0, 0, 0, 0 } }; int c; - char *cmdline; + char *cmdline = NULL; + int option_index; ignore_value (chdir ("/")); @@ -178,10 +180,21 @@ main (int argc, char *argv[]) root_device = statbuf.st_dev; for (;;) { - c = getopt_long (argc, argv, options, long_options, NULL); + c = getopt_long (argc, argv, options, long_options, &option_index); if (c == -1) break; switch (c) { + case 0: /* options which are long only */ + if (S...
2019 Aug 17
3
Giving full administrator privileges through sudo on production systems
Why did you say it is wrong to give full admin privileges to random users? -- An old man doll... just what I always wanted! - Clara
2019 Aug 17
0
Giving full administrator privileges through sudo on production systems
...Valeri Galtsev <galtsev at kicp.uchicago.edu> wrote: > I like this one. Long-long ago it was one of the ?tricky? questions at the UNIX admin test (exam). Basically, no matter how devastating that may sound, the command only will remove what is (alphabetically it was that time) before /dev/[root_device]. Once the device root filesystem lives on is removed from /dev, no further damage is done. So, you will be able to mount drive on another machine and get your /etc, /home, /var, /usr/local intact ;-) Asking that question other people gave me (an them usually) a lot of fun. I?m not sure what UNIX...
2019 Aug 29
2
Giving full administrator privileges through sudo on production systems
...ri Galtsev <galtsev at kicp.uchicago.edu> wrote: >> I like this one. Long-long ago it was one of the ?tricky? questions at the UNIX admin test (exam). Basically, no matter how devastating that may sound, the command only will remove what is (alphabetically it was that time) before /dev/[root_device]. Once the device root filesystem lives on is removed from /dev, no further damage is done. So, you will be able to mount drive on another machine and get your /etc, /home, /var, /usr/local intact ;-) Asking that question other people gave me (an them usually) a lot of fun. > > > I?m not...
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...initrd, and is therefore extremely nasty # and applicable only to a particular version of mkinitrd. if ($desc->{distro} eq 'rhel' && $desc->{major_version} eq '4') { - push(@env, 'root_lvm=1') if ($g->is_lv($desc->{root_device})); + push(@env, 'root_lvm=1') if ($g->is_lv($root)); } $g->sh(join(' ', @env).' /sbin/mkinitrd '.join(' ', @module_args). diff --git a/lib/Sys/VirtConvert/Converter/Windows.pm b/lib/Sys/VirtConvert/Converter/Windows.p...
2017 Jul 19
2
Re: [PATCH 02/27] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...Some filename -> > + push_back args "-E"; > + push_back args filename > + ); > + let args = !args in > + let r, _, err = commandr "udevadm" args in > + if r <> 0 then > + eprintf "udevadm settle: %s\n" err > + > +let root_device = lazy ((stat "/").st_dev) > + > +let is_root_device_stat statbuf = > + statbuf.st_rdev = Lazy.force root_device > + > +let is_root_device device = > + udev_settle ~filename:device (); > + try > + let statbuf = stat device in > + is_root_device_stat sta...
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623 The first two patches are cleanups. The third patch changes the way that we handle Device and Dev_or_Path parameters so that a parameter marked as such can really only contain a block device name (and not, for instance, a chardev). Using a chardev here caused hangs in the API. The next two patches fix API usage to conform to this new stricter
2006 Mar 30
7
RE: [RFC][PATCH] create an initrd for dom0 in install.shscript
...ts to all all kernels found in /boot. -m "module list" Modules to include in initrd. Defaults to the INITRD_MODULES variable in /etc/sysconfig/kernel. -b boot_dir Boot directory. Defaults to /boot. -d root_device Root device. Defaults to the device from which the root_dir is mounted. Overrides the rootdev enviroment variable if set. -s size Add splash animation and bootscreen to initrd. -t tmp_dir Temporary directory....
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...on/utils.ml | 1 + daemon/utils.mli | 4 +++ daemon/xfs.c | 4 +-- 12 files changed, 107 insertions(+), 21 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index a40dc3834..02ae34a6f 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -62,6 +62,7 @@ extern dev_t root_device; extern char *sysroot_path (const char *path); extern char *sysroot_realpath (const char *path); extern int is_root_device (const char *device); +extern int is_device_parameter (const char *device); extern int xwrite (int sock, const void *buf, size_t len) __attribute__((__warn_unused_result...
2017 Jul 14
0
[PATCH 02/27] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...atch filename with + | None -> () + | Some filename -> + push_back args "-E"; + push_back args filename + ); + let args = !args in + let r, _, err = commandr "udevadm" args in + if r <> 0 then + eprintf "udevadm settle: %s\n" err + +let root_device = lazy ((stat "/").st_dev) + +let is_root_device_stat statbuf = + statbuf.st_rdev = Lazy.force root_device + +let is_root_device device = + udev_settle ~filename:device (); + try + let statbuf = stat device in + is_root_device_stat statbuf + with + Unix_error (err, func, arg)...
2017 Jun 03
3
[PATCH 0/3]: daemon: Reimplement ‘file’ API in OCaml.
This patch series is just FYI at the moment. However it does pass the tests. The daemon is a self-contained program. We don't need to write it all in C. Writing parts of it in OCaml would make it simpler and less error-prone. In particular if the daemon was written in a more sane programming language then we could move the inspection code to run entirely inside the appliance, which would