Ejemplo n.º 1
0
        public static void Do()
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.Clear();
            Console.Write("Initializing boot loader... ");
            Time.Wait(1);
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Done");
            Console.ForegroundColor = ConsoleColor.White;

            Console.Write("Initializing contents... ");
            Time.Wait(1);
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Done");
            Console.ForegroundColor = ConsoleColor.White;
            Console.Write("Please wait... ");
            Time.Wait(1);
            Console.Clear();

            Console.WriteLine("Welcome to FlowDOS setup.");
            Console.WriteLine("Please select a partition to install onto.");
            for (int i = 0; i < Cosmos.Hardware.BlockDevice.Partition.Devices.Count; i++)
            {
                Console.WriteLine((i + 1).ToString() + " - Size: " + (Cosmos.Hardware.BlockDevice.Partition.Devices[i].BlockCount).ToString());
            }

            String a = Console.ReadLine();

            Cosmos.Hardware.BlockDevice.Partition part = (Cosmos.Hardware.BlockDevice.Partition)Cosmos.Hardware.BlockDevice.Partition.Devices[Int32.Parse(a) - 1];
            Console.WriteLine("FlowDOS will now format this partition. Press any key to continue.");
            //GruntyOS.HAL.GLNFS fs = new GruntyOS.HAL.GLNFS(part);
            Kernel.fd = new GruntyOS.HAL.GLNFS(part);

            Kernel.fd.Format("FlowDOS");
            Console.WriteLine("Format complete!");
            Console.Clear();
            Console.WriteLine("Setup part 2 - setup");
            Console.WriteLine("Enter a password for the administrator account.");

            string passwdf = "root:" + Console.ReadLine() + ":0";

            Console.WriteLine("Your computer needs a name! Please enter it now");
            string name = Console.ReadLine();

            Console.WriteLine("Assembling system files, please wait");
            GruntyOS.CurrentUser.Username   = "******";
            GruntyOS.CurrentUser.Privilages = 0;
            //Kernel.fd.makeDir("/sys/bin", "SYSTEM");
            Kernel.CreateFolders();
            Kernel.fd.saveFile(FS.StringToByte(passwdf), "/usr/passwd", "SYSTEM");
            Kernel.fd.saveFile(FS.StringToByte(name), "/sys/conf/compname", "SYSTEM");
            //Kernel.fd.makeDir("/home/root", "root");

            Console.WriteLine("Install complete. Press any key to reboot...");
            Console.ReadKey();

            Kernel.RebootACPI();
        }
 public Partition(Cosmos.Hardware.BlockDevice.Partition part, clusterSize cluster_size)
 {
     clusterAmount = (ulong)cluster_size;
     clusterScale  = (uint)cluster_size / (uint)part.BlockSize;
     clusterAmount = part.BlockCount / (ulong)cluster_size;
 }
 public override bool CheckIfFS(Cosmos.Hardware.BlockDevice.Partition p)
 {
     return(GruntyOS.HAL.GLNFS.isGFS(p));
 }
 public GLNFS(Cosmos.Hardware.BlockDevice.Partition p)
 {
     fs = new GruntyOS.HAL.GLNFS(p);
 }
Ejemplo n.º 5
0
 public WitchFS(Cosmos.Hardware.BlockDevice.Partition p) : base(p)
 {
 }
Ejemplo n.º 6
0
 public static bool CheckIfFS(Cosmos.Hardware.BlockDevice.Partition p)
 {
     throw new NotImplementedException();
 }
 public abstract bool CheckIfFS(Cosmos.Hardware.BlockDevice.Partition p);
Ejemplo n.º 8
0
 public static bool CheckIfFS(Cosmos.Hardware.BlockDevice.Partition p)
 {
     return(fs.IsAFS());
 }
Ejemplo n.º 9
0
 public AtomFS(Cosmos.Hardware.BlockDevice.Partition p) : base(p)
 {
     fs = new Atom_File_System.Core.AFS(p);
 }
 public Filesystem(Cosmos.Hardware.BlockDevice.Partition p)
 {
     this.currentPart = p;
 }
 public GLNxDev(Cosmos.Hardware.BlockDevice.Partition p) : base(p)
 {
 }