You'll have to boot a live USB/CD, just as you'd perform an installation from scratch.
I don't know if there's a better way to fix sqlite (besdes having a backup), sorry. On Tue, Jul 26, 2016 at 10:08 AM, Marco Maggesi <[email protected]> wrote: > I'm on NixOS. I see that the nixos-install is present in my system. > Then I would like to avoid to burn a new installation CD, if possible. > > Can I run nixos-install from my installed system? > I tried, and this is what I get: > > # nixos-install --root / > /run/current-system/sw/bin/nixos-install: line 88: > /run/current-system/sw/bin/mount: No such file or directory > > # mount /dev/disk/by-label/nixos /mnt > > # nixos-install > cp: cannot stat '/etc/resolv.conf': No such file or directory > cp: cannot stat '/etc/hosts': No such file or directory > > Thanks again, > Marco > > > > 2016-07-26 9:18 GMT+02:00 Domen Kožar <[email protected]>: > >> If it's a single user install, just run: >> >> $ curl https://nixos.org/nix/install | sh >> >> If it's a multi-user install, follow >> http://nixos.org/nix/manual/#ssec-multi-user >> >> For NixOS, run nixos-install on your root partition. >> >> >> On Tue, Jul 26, 2016 at 9:13 AM, Marco Maggesi <[email protected]> >> wrote: >> >>> Thanks Domen. >>> >>> But how I do (re)install Nix? >>> From sources? >>> >>> M. >>> >>> 2016-07-25 10:46 GMT+02:00 Domen Kožar <[email protected]>: >>> >>>> Happened to me once, I deleted the sqlite db (made a backup of it >>>> first) and just installed Nix again. >>>> >>>> On Mon, Jul 25, 2016 at 10:23 AM, Marco Maggesi <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> during the last upgrade I got this error: >>>>> >>>>> # nix-env --always -u >>>>> error: querying path in database: database disk image is malformed >>>>> (use ‘--show-trace’ to show detailed location information) >>>>> >>>>> Here is what sqlite says: >>>>> >>>>> ./sqlite3 /nix/var/nix/db/db.sqlite "pragma integrity_check" >>>>> *** in database main *** >>>>> Page 5033: btreeInitPage() returns error code 11 >>>>> Page 3988: btreeInitPage() returns error code 11 >>>>> Page 1926: btreeInitPage() returns error code 11 >>>>> Page 2363: btreeInitPage() returns error code 11 >>>>> Page 3146: btreeInitPage() returns error code 11 >>>>> Page 5090: btreeInitPage() returns error code 11 >>>>> Page 5124: btreeInitPage() returns error code 11 >>>>> Page 283: btreeInitPage() returns error code 11 >>>>> Error: database disk image is malformed >>>>> >>>>> Can you give me a suggestion on the cheapest way to recover from this? >>>>> >>>>> Thanks, >>>>> Marco >>>>> >>>>> >>>>> _______________________________________________ >>>>> nix-dev mailing list >>>>> [email protected] >>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> nix-dev mailing list >>>> [email protected] >>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >>>> >>>> >>> >> >> _______________________________________________ >> nix-dev mailing list >> [email protected] >> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> >> > > _______________________________________________ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > >
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
