[OpenIndiana-discuss] mounting an existing system on a boot image
Jonathan Adams
t12nslookup at gmail.com
Mon Sep 10 09:10:58 UTC 2018
https://askubuntu.com/questions/56792/how-to-copy-only-file-attributes-metadata-without-actual-content-of-the-file
--
#!/bin/bash
# Filename: cp-metadata
myecho=echo
src_path="$1"
dst_path="$2"
find "$src_path" |
while read src_file; do
dst_file="$dst_path${src_file#$src_path}"
$myecho chmod --reference="$src_file" "$dst_file"
$myecho chown --reference="$src_file" "$dst_file"
$myecho touch --reference="$src_file" "$dst_file"
done
--
YMMV
On Mon, 10 Sep 2018 at 09:54, Marc Lobelle <marc.lobelle at uclouvain.be>
wrote:
> Hello,
>
> by doing a wrong chmod in /etc (I thought I was in another directory) I
> made /etc/init and thus /sbin/init not executable, so the system does
> not boot anymore even in single user.
>
> Thus I booted a live image from a DVD and I would like to mount my root
> file sustem on this image in order to fix the permissions in /sbin and
> /usr/sbin
>
> In old solaris versions, as far as I remember there was even a menu
> entry for this.
>
> But I do not know how to do it now with zfs from the live image. I'm
> running the live image in gui mode.
>
> Could somebody help me with this ?
>
> Thanks
>
>
> Marc
>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
>
More information about the openindiana-discuss
mailing list